Interface Store
- All Known Implementing Classes:
StoreAreaAwareStoreWrapper
@ProviderType
public interface Store
The interface for all file store implementations. Most, if not all
implementations should extend from the class
BaseStore.- Author:
- Brian Wing Shun Chan, Edward Han
- See Also:
-
BaseStore
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFile(long companyId, long repositoryId, String fileName, String versionLabel, InputStream inputStream) Adds a file based on anInputStreamobject.voiddeleteDirectory(long companyId, long repositoryId, String dirName) Deletes a directory.voiddeleteFile(long companyId, long repositoryId, String fileName, String versionLabel) Deletes a file at a particular version.getFileAsStream(long companyId, long repositoryId, String fileName, String versionLabel) Returns the file as anInputStreamobject.String[]getFileNames(long companyId, long repositoryId, String dirName) Returns all files of the directory.longgetFileSize(long companyId, long repositoryId, String fileName, String versionLabel) Returns the size of the file.String[]getFileVersions(long companyId, long repositoryId, String fileName) booleanReturnstrueif the file exists.
-
Field Details
-
VERSION_DEFAULT
- See Also:
-
-
Method Details
-
addFile
void addFile(long companyId, long repositoryId, String fileName, String versionLabel, InputStream inputStream) throws PortalException Adds a file based on anInputStreamobject.- Parameters:
companyId- the primary key of the companyrepositoryId- the primary key of the data repository (optionallyCompanyConstants.SYSTEM)fileName- the file nameversionLabel- the file's version labelinputStream- the files's data- Throws:
PortalException
-
deleteDirectory
Deletes a directory.- Parameters:
companyId- the primary key of the companyrepositoryId- the primary key of the data repository (optionallyCompanyConstants.SYSTEM)dirName- the directory's name
-
deleteFile
Deletes a file at a particular version.- Parameters:
companyId- the primary key of the companyrepositoryId- the primary key of the data repository (optionallyCompanyConstants.SYSTEM)fileName- the file's nameversionLabel- the file's version label
-
getFileAsStream
InputStream getFileAsStream(long companyId, long repositoryId, String fileName, String versionLabel) throws PortalException Returns the file as anInputStreamobject.- Parameters:
companyId- the primary key of the companyrepositoryId- the primary key of the data repository (optionallyCompanyConstants.SYSTEM)fileName- the file's nameversionLabel- the file's version label- Returns:
- Returns the
InputStreamobject with the file's name - Throws:
PortalException
-
getFileNames
Returns all files of the directory.- Parameters:
companyId- the primary key of the companyrepositoryId- the primary key of the data repository (optionallyCompanyConstants.SYSTEM)dirName- the directory's name- Returns:
- Returns all files of the directory
-
getFileSize
long getFileSize(long companyId, long repositoryId, String fileName, String versionLabel) throws PortalException Returns the size of the file.- Parameters:
companyId- the primary key of the companyrepositoryId- the primary key of the data repository (optionallyCompanyConstants.SYSTEM)fileName- the file's name- Returns:
- Returns the size of the file
- Throws:
PortalException
-
getFileVersions
-
hasFile
Returnstrueif the file exists.- Parameters:
companyId- the primary key of the companyrepositoryId- the primary key of the data repository (optionallyCompanyConstants.SYSTEM)fileName- the file's nameversionLabel- the file's version label- Returns:
trueif the file exists;falseotherwise
-