|
Liferay 7.0-ce-m6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portlet.documentlibrary.store.BaseStore
com.liferay.portlet.documentlibrary.store.DBStore
public class DBStore
| Field Summary |
|---|
| Fields inherited from interface com.liferay.portlet.documentlibrary.store.Store |
|---|
VERSION_DEFAULT |
| Constructor Summary | |
|---|---|
DBStore()
|
|
| Method Summary | |
|---|---|
void |
addDirectory(long companyId,
long repositoryId,
String dirName)
Adds a directory. |
void |
addFile(long companyId,
long repositoryId,
String fileName,
byte[] bytes)
Adds a file based on a byte array. |
void |
addFile(long companyId,
long repositoryId,
String fileName,
File file)
Adds a file based on a File object. |
void |
addFile(long companyId,
long repositoryId,
String fileName,
InputStream inputStream)
Adds a file based on an InputStream object. |
void |
checkRoot(long companyId)
Ensures company's root directory exists. |
void |
deleteDirectory(long companyId,
long repositoryId,
String dirName)
Deletes a directory. |
void |
deleteFile(long companyId,
long repositoryId,
String fileName)
Deletes a file. |
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)
Returns the file as an InputStream object. |
InputStream |
getFileAsStream(long companyId,
long repositoryId,
String fileName,
String versionLabel)
Returns the file as an InputStream object. |
String[] |
getFileNames(long companyId,
long repositoryId)
|
String[] |
getFileNames(long companyId,
long repositoryId,
String dirName)
Returns all files of the directory. |
long |
getFileSize(long companyId,
long repositoryId,
String fileName)
Returns the size of the file. |
boolean |
hasDirectory(long companyId,
long repositoryId,
String dirName)
Returns true if the directory exists. |
boolean |
hasFile(long companyId,
long repositoryId,
String fileName,
String versionLabel)
Returns true if the file exists. |
void |
updateFile(long companyId,
long repositoryId,
long newRepositoryId,
String fileName)
Moves a file to a new data repository. |
void |
updateFile(long companyId,
long repositoryId,
String fileName,
String newFileName)
|
void |
updateFile(long companyId,
long repositoryId,
String fileName,
String versionLabel,
byte[] bytes)
Updates a file based on a byte array. |
void |
updateFile(long companyId,
long repositoryId,
String fileName,
String versionLabel,
File file)
Updates a file based on a File object. |
void |
updateFile(long companyId,
long repositoryId,
String fileName,
String versionLabel,
InputStream inputStream)
Updates a file based on an InputStream object. |
| Methods inherited from class com.liferay.portlet.documentlibrary.store.BaseStore |
|---|
copyFileVersion, getFile, getFile, getFileAsBytes, getFileAsBytes, hasFile, logFailedDeletion, logFailedDeletion, move, updateFileVersion |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DBStore()
| Method Detail |
|---|
public void addDirectory(long companyId,
long repositoryId,
String dirName)
BaseStore
addDirectory in interface StoreaddDirectory in class BaseStorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)dirName - the directory's name
public void addFile(long companyId,
long repositoryId,
String fileName,
byte[] bytes)
throws DuplicateFileException
BaseStore
addFile in interface StoreaddFile in class BaseStorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file namebytes - the files's data
DuplicateFileException
public void addFile(long companyId,
long repositoryId,
String fileName,
File file)
throws DuplicateFileException
BaseStoreFile object.
addFile in interface StoreaddFile in class BaseStorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file namefile - Name the file name
DuplicateFileException
public void addFile(long companyId,
long repositoryId,
String fileName,
InputStream inputStream)
throws DuplicateFileException
BaseStoreInputStream object.
addFile in interface StoreaddFile in class BaseStorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file nameinputStream - the files's data
DuplicateFileExceptionpublic void checkRoot(long companyId)
BaseStoreJCRStore.checkRoot(long).
checkRoot in interface StorecheckRoot in class BaseStorecompanyId - the primary key of the company
public void deleteDirectory(long companyId,
long repositoryId,
String dirName)
BaseStore
deleteDirectory in interface StoredeleteDirectory in class BaseStorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)dirName - the directory's name
public void deleteFile(long companyId,
long repositoryId,
String fileName)
BaseStore
deleteFile in interface StoredeleteFile in class BaseStorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file's name
public void deleteFile(long companyId,
long repositoryId,
String fileName,
String versionLabel)
BaseStore
deleteFile in interface StoredeleteFile in class BaseStorecompanyId - 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 label
@Transactional(propagation=REQUIRED)
public InputStream getFileAsStream(long companyId,
long repositoryId,
String fileName)
throws NoSuchFileException
BaseStoreInputStream object.
getFileAsStream in interface StoregetFileAsStream in class BaseStorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file's name
InputStream object with the file's name
NoSuchFileException
@Transactional(propagation=REQUIRED)
public InputStream getFileAsStream(long companyId,
long repositoryId,
String fileName,
String versionLabel)
throws NoSuchFileException
BaseStoreInputStream object.
getFileAsStream in interface StoregetFileAsStream in class BaseStorecompanyId - 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 label
InputStream object with the file's name
NoSuchFileException
public String[] getFileNames(long companyId,
long repositoryId)
public String[] getFileNames(long companyId,
long repositoryId,
String dirName)
BaseStore
getFileNames in interface StoregetFileNames in class BaseStorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)dirName - the directory's name
public long getFileSize(long companyId,
long repositoryId,
String fileName)
throws NoSuchFileException
BaseStore
getFileSize in interface StoregetFileSize in class BaseStorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)fileName - the file's name
NoSuchFileException
public boolean hasDirectory(long companyId,
long repositoryId,
String dirName)
BaseStoretrue if the directory exists.
hasDirectory in interface StorehasDirectory in class BaseStorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repository (optionally
CompanyConstants.SYSTEM)dirName - the directory's name
true if the directory exists; false
otherwise
public boolean hasFile(long companyId,
long repositoryId,
String fileName,
String versionLabel)
BaseStoretrue if the file exists.
hasFile in interface StorehasFile in class BaseStorecompanyId - 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 label
true if the file exists; false
otherwise
public void updateFile(long companyId,
long repositoryId,
long newRepositoryId,
String fileName)
throws DuplicateFileException,
NoSuchFileException
BaseStore
updateFile in interface StoreupdateFile in class BaseStorecompanyId - the primary key of the companyrepositoryId - the primary key of the data repositorynewRepositoryId - the primary key of the new data repositoryfileName - the file's name
DuplicateFileException
NoSuchFileException
public void updateFile(long companyId,
long repositoryId,
String fileName,
String newFileName)
throws DuplicateFileException,
NoSuchFileException
DuplicateFileException
NoSuchFileException
public void updateFile(long companyId,
long repositoryId,
String fileName,
String versionLabel,
byte[] bytes)
throws DuplicateFileException
BaseStore
updateFile in interface StoreupdateFile in class BaseStorecompanyId - 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 data
DuplicateFileException
public void updateFile(long companyId,
long repositoryId,
String fileName,
String versionLabel,
File file)
throws DuplicateFileException
BaseStoreFile object.
updateFile in interface StoreupdateFile in class BaseStorecompanyId - 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 name
DuplicateFileException
public void updateFile(long companyId,
long repositoryId,
String fileName,
String versionLabel,
InputStream inputStream)
throws DuplicateFileException
BaseStoreInputStream object.
updateFile in interface StoreupdateFile in class BaseStorecompanyId - 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 labelinputStream - the new file's data
DuplicateFileException
|
Liferay 7.0-ce-m6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||