VERSION_DEFAULT| Constructor and Description |
|---|
BaseStore() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addDirectory(long companyId,
long repositoryId,
java.lang.String dirName)
Adds a directory.
|
void |
addFile(long companyId,
long repositoryId,
java.lang.String fileName,
byte[] bytes)
Adds a file based on a byte array.
|
void |
addFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.io.File file)
Adds a file based on a
File object. |
abstract void |
addFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.io.InputStream is)
Adds a file based on an
InputStream object. |
abstract void |
checkRoot(long companyId)
Ensures company's root directory exists.
|
void |
copyFileVersion(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String fromVersionLabel,
java.lang.String toVersionLabel)
Creates a new copy of the file version.
|
abstract void |
deleteDirectory(long companyId,
long repositoryId,
java.lang.String dirName)
Deletes a directory.
|
abstract void |
deleteFile(long companyId,
long repositoryId,
java.lang.String fileName)
Deletes a file.
|
abstract void |
deleteFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
Deletes a file at a particular version.
|
java.io.File |
getFile(long companyId,
long repositoryId,
java.lang.String fileName)
Returns the file as a
File object. |
java.io.File |
getFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
Returns the file as a
File object. |
byte[] |
getFileAsBytes(long companyId,
long repositoryId,
java.lang.String fileName)
Returns the file as a byte array.
|
byte[] |
getFileAsBytes(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
Returns the file as a byte array.
|
java.io.InputStream |
getFileAsStream(long companyId,
long repositoryId,
java.lang.String fileName)
Returns the file as an
InputStream object. |
abstract java.io.InputStream |
getFileAsStream(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
Returns the file as an
InputStream object. |
abstract java.lang.String[] |
getFileNames(long companyId,
long repositoryId,
java.lang.String dirName)
Returns all files of the directory.
|
abstract long |
getFileSize(long companyId,
long repositoryId,
java.lang.String fileName)
Returns the size of the file.
|
abstract boolean |
hasDirectory(long companyId,
long repositoryId,
java.lang.String dirName)
Returns
true if the directory exists. |
boolean |
hasFile(long companyId,
long repositoryId,
java.lang.String fileName)
Returns
true if the file exists. |
abstract boolean |
hasFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
Returns
true if the file exists. |
abstract void |
move(java.lang.String srcDir,
java.lang.String destDir)
Moves an existing directory.
|
abstract void |
updateFile(long companyId,
long repositoryId,
long newRepositoryId,
java.lang.String fileName)
Moves a file to a new data repository.
|
void |
updateFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel,
byte[] bytes)
Updates a file based on a byte array.
|
void |
updateFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel,
java.io.File file)
Updates a file based on a
File object. |
abstract void |
updateFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel,
java.io.InputStream is)
Updates a file based on an
InputStream object. |
void |
updateFileVersion(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String fromVersionLabel,
java.lang.String toVersionLabel)
Update's a file version label.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFileNames, updateFilepublic abstract void addDirectory(long companyId,
long repositoryId,
java.lang.String dirName)
throws PortalException,
SystemException
addDirectory in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)dirName - the directory's namePortalException - if the directory's information was invalidSystemException - if a system exception occurredpublic void addFile(long companyId,
long repositoryId,
java.lang.String fileName,
byte[] bytes)
throws PortalException,
SystemException
addFile in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file namebytes - the files's dataPortalException - if the file's information was invalidSystemException - if a system exception occurredpublic void addFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.io.File file)
throws PortalException,
SystemException
File object.addFile in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file namefile - Name the file namePortalException - if the file's information was invalidSystemException - if a system exception occurredpublic abstract void addFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.io.InputStream is)
throws PortalException,
SystemException
InputStream object.addFile in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file nameis - the files's dataPortalException - if the file's information was invalidSystemException - if a system exception occurredpublic abstract void checkRoot(long companyId)
throws SystemException
JCRStore.checkRoot(long).checkRoot in interface StorecompanyId - the primary key of the companySystemException - if a system exception occurredpublic void copyFileVersion(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String fromVersionLabel,
java.lang.String toVersionLabel)
throws PortalException,
SystemException
This method should be overrided if a more optimized approach can be used
(e.g., FileSystemStore.copyFileVersion(long, long, String, String,
String)).
copyFileVersion in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the original's file namefromVersionLabel - the original file's version labeltoVersionLabel - the new version labelPortalException - if the file's information was invalidSystemException - if a system exception occurredpublic abstract void deleteDirectory(long companyId,
long repositoryId,
java.lang.String dirName)
throws PortalException,
SystemException
deleteDirectory in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)dirName - the directory's namePortalException - if the directory's information was invalidSystemException - if a system exception occurredpublic abstract void deleteFile(long companyId,
long repositoryId,
java.lang.String fileName)
throws PortalException,
SystemException
deleteFile in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file's namePortalException - if the file's information was invalidSystemException - if a system exception occurredpublic abstract void deleteFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
throws PortalException,
SystemException
deleteFile in interface StorecompanyId - 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 labelPortalException - if the file's information was invalidSystemException - if a system exception occurredpublic java.io.File getFile(long companyId,
long repositoryId,
java.lang.String fileName)
throws PortalException,
SystemException
File object.
This method is useful when optimizing low-level file operations like
copy. The client must not delete or change the returned File
object in any way. This method is only supported in certain stores. If
not supported, this method will throw an UnsupportedOperationException.
getFile in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file's nameFile object with the file's namePortalException - if the file's information was invalidSystemException - if a system exception occurredpublic java.io.File getFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
throws PortalException,
SystemException
File object.
This method is useful when optimizing low-level file operations like
copy. The client must not delete or change the returned File
object in any way. This method is only supported in certain stores. If
not supported, this method will throw an UnsupportedOperationException.
This method should be overrided if a more optimized approach can be used
(e.g., FileSystemStore.getFile(long, long, String, String)).
getFile in interface StorecompanyId - 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 labelFile object with the file's namePortalException - if the file's information was invalidSystemException - if a system exception occurredpublic byte[] getFileAsBytes(long companyId,
long repositoryId,
java.lang.String fileName)
throws PortalException,
SystemException
getFileAsBytes in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file's namePortalException - if the file's information was invalidSystemException - if a system exception occurredpublic byte[] getFileAsBytes(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
throws PortalException,
SystemException
getFileAsBytes in interface StorecompanyId - 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 labelPortalException - if the file's information was invalidSystemException - if a system exception occurredpublic java.io.InputStream getFileAsStream(long companyId,
long repositoryId,
java.lang.String fileName)
throws PortalException,
SystemException
InputStream object.getFileAsStream in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file's nameInputStream object with the file's namePortalException - if the file's information was invalidSystemException - if a system exception occurredpublic abstract java.io.InputStream getFileAsStream(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
throws PortalException,
SystemException
InputStream object.getFileAsStream in interface StorecompanyId - 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 - if the file's information was invalidSystemException - if a system exception occurredpublic abstract java.lang.String[] getFileNames(long companyId,
long repositoryId,
java.lang.String dirName)
throws PortalException,
SystemException
getFileNames in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)dirName - the directory's namePortalException - if the directory's information was invalidSystemException - if a system exception occurredpublic abstract long getFileSize(long companyId,
long repositoryId,
java.lang.String fileName)
throws PortalException,
SystemException
getFileSize in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file's namePortalException - if the file's information was invalidSystemException - if a system exception occurredpublic abstract boolean hasDirectory(long companyId,
long repositoryId,
java.lang.String dirName)
throws PortalException,
SystemException
true if the directory exists.hasDirectory in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)dirName - the directory's nametrue if the directory exists; false
otherwisePortalException - if the directory's information was invalidSystemException - if a system exception occurredpublic boolean hasFile(long companyId,
long repositoryId,
java.lang.String fileName)
throws PortalException,
SystemException
true if the file exists.hasFile in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file's nametrue if the file exists; false
otherwisePortalException - if the file's information was invalidSystemException - if a system exception occurredpublic abstract boolean hasFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
throws PortalException,
SystemException
true if the file exists.hasFile in interface StorecompanyId - 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
otherwisePortalException - if the file's information was invalidSystemException - if a system exception occurredpublic abstract void move(java.lang.String srcDir,
java.lang.String destDir)
throws SystemException
JCRStore.move(String, String).move in interface StoresrcDir - the original directory's namedestDir - the new directory's nameSystemException - if a system exception occurredpublic abstract void updateFile(long companyId,
long repositoryId,
long newRepositoryId,
java.lang.String fileName)
throws PortalException,
SystemException
updateFile in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repositorynewRepositoryId - the primary key of the new data repositoryfileName - the file's namePortalException - if the file's information was invalidSystemException - if a system exception occurredpublic void updateFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel,
byte[] bytes)
throws PortalException,
SystemException
updateFile in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file nameversionLabel - the file's new version labelbytes - the new file's dataPortalException - if the file's information was invalidSystemException - if a system exception occurredpublic void updateFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel,
java.io.File file)
throws PortalException,
SystemException
File object.updateFile in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file nameversionLabel - the file's new version labelfile - Name the file namePortalException - if the file's information was invalidSystemException - if a system exception occurredpublic abstract void updateFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel,
java.io.InputStream is)
throws PortalException,
SystemException
InputStream object.updateFile in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file nameversionLabel - the file's new version labelis - the new file's dataPortalException - if the file's information was invalidSystemException - if a system exception occurredpublic void updateFileVersion(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String fromVersionLabel,
java.lang.String toVersionLabel)
throws PortalException,
SystemException
copyFileVersion(long,
long, String, String, String) except that the old file version is
deleted.updateFileVersion in interface StorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file's namefromVersionLabel - the file's version labeltoVersionLabel - the file's new version labelPortalException - if the file's information was invalidSystemException - if a system exception occurred