VERSION_DEFAULT
Constructor and Description |
---|
StoreAreaAwareStoreWrapper(Supplier<Store> storeSupplier,
Supplier<StoreAreaProcessor> storeAreaProcessorSupplier) |
Modifier and Type | Method and Description |
---|---|
void |
addFile(long companyId,
long repositoryId,
String fileName,
String versionLabel,
InputStream inputStream)
Adds a file based on an
InputStream object. |
void |
deleteDirectory(long companyId,
long repositoryId,
String dirName)
Deletes a directory.
|
void |
deleteFile(long companyId,
long repositoryId,
String fileName,
String versionLabel)
Deletes a file at a particular version.
|
InputStream |
getFileAsStream(long companyId,
long repositoryId,
String fileName,
String versionLabel)
Returns the file as an
InputStream object. |
String[] |
getFileNames(long companyId,
long repositoryId,
String dirName)
Returns all files of the directory.
|
long |
getFileSize(long companyId,
long repositoryId,
String fileName,
String versionLabel)
Returns the size of the file.
|
String[] |
getFileVersions(long companyId,
long repositoryId,
String fileName) |
boolean |
hasFile(long companyId,
long repositoryId,
String fileName,
String versionLabel)
Returns
true if the file exists. |
public StoreAreaAwareStoreWrapper(Supplier<Store> storeSupplier, Supplier<StoreAreaProcessor> storeAreaProcessorSupplier)
public void addFile(long companyId, long repositoryId, String fileName, String versionLabel, InputStream inputStream) throws PortalException
Store
InputStream
object.addFile
in interface Store
companyId
- the primary key of the companyrepositoryId
- the primary key of the data repository (optionally
CompanyConstants.SYSTEM
)fileName
- the file nameversionLabel
- the file's version labelinputStream
- the files's dataPortalException
public void deleteDirectory(long companyId, long repositoryId, String dirName)
Store
deleteDirectory
in interface Store
companyId
- the primary key of the companyrepositoryId
- the primary key of the data repository (optionally
CompanyConstants.SYSTEM
)dirName
- the directory's namepublic void deleteFile(long companyId, long repositoryId, String fileName, String versionLabel)
Store
deleteFile
in interface Store
companyId
- the primary key of the companyrepositoryId
- the primary key of the data repository (optionally
CompanyConstants.SYSTEM
)fileName
- the file's nameversionLabel
- the file's version labelpublic InputStream getFileAsStream(long companyId, long repositoryId, String fileName, String versionLabel) throws PortalException
Store
InputStream
object.getFileAsStream
in interface Store
companyId
- the primary key of the companyrepositoryId
- the primary key of the data repository (optionally
CompanyConstants.SYSTEM
)fileName
- the file's nameversionLabel
- the file's version labelInputStream
object with the file's namePortalException
public String[] getFileNames(long companyId, long repositoryId, String dirName)
Store
getFileNames
in interface Store
companyId
- the primary key of the companyrepositoryId
- the primary key of the data repository (optionally
CompanyConstants.SYSTEM
)dirName
- the directory's namepublic long getFileSize(long companyId, long repositoryId, String fileName, String versionLabel) throws PortalException
Store
getFileSize
in interface Store
companyId
- the primary key of the companyrepositoryId
- the primary key of the data repository (optionally
CompanyConstants.SYSTEM
)fileName
- the file's namePortalException
public String[] getFileVersions(long companyId, long repositoryId, String fileName)
getFileVersions
in interface Store
public boolean hasFile(long companyId, long repositoryId, String fileName, String versionLabel)
Store
true
if the file exists.hasFile
in interface Store
companyId
- the primary key of the companyrepositoryId
- the primary key of the data repository (optionally
CompanyConstants.SYSTEM
)fileName
- the file's nameversionLabel
- the file's version labeltrue
if the file exists; false
otherwise