|
Liferay 6.2-ce-ga2 | |||||||||
| 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.JCRStore
public class JCRStore
| Field Summary |
|---|
| Fields inherited from interface com.liferay.portlet.documentlibrary.store.Store |
|---|
VERSION_DEFAULT |
| Constructor Summary | |
|---|---|
JCRStore()
|
|
| Method Summary | |
|---|---|
void |
addDirectory(long companyId,
long repositoryId,
String dirName)
Adds a directory. |
void |
addFile(long companyId,
long repositoryId,
String fileName,
InputStream is)
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,
String versionLabel)
Returns the file as an InputStream object. |
protected javax.jcr.Node |
getFileContentNode(long companyId,
long repositoryId,
String fileName,
String versionLabel)
|
protected javax.jcr.Node |
getFileContentNode(javax.jcr.Session session,
long companyId,
long repositoryId,
String fileName,
String versionLabel)
|
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. |
protected javax.jcr.Node |
getFolderNode(javax.jcr.Node node,
long name)
|
protected javax.jcr.Node |
getFolderNode(javax.jcr.Node node,
String name)
|
protected javax.jcr.Node |
getRootNode(javax.jcr.Session session,
long companyId)
|
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 |
move(String srcDir,
String destDir)
Moves an existing directory. |
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,
InputStream is)
Updates a file based on an InputStream object. |
| Methods inherited from class com.liferay.portlet.documentlibrary.store.BaseStore |
|---|
addFile, addFile, copyFileVersion, getFile, getFile, getFileAsBytes, getFileAsBytes, getFileAsStream, hasFile, updateFile, updateFile, updateFileVersion |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JCRStore()
| Method Detail |
|---|
public void addDirectory(long companyId,
long repositoryId,
String dirName)
throws PortalException,
SystemException
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
PortalException - if the directory's information was invalid
SystemException - if a system exception occurred
public void addFile(long companyId,
long repositoryId,
String fileName,
InputStream is)
throws PortalException,
SystemException
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 nameis - the files's data
PortalException - if the file's information was invalid
SystemException - if a system exception occurred
public void checkRoot(long companyId)
throws SystemException
BaseStorecheckRoot(long).
checkRoot in interface StorecheckRoot in class BaseStorecompanyId - the primary key of the company
SystemException - if a system exception occurred
public void deleteDirectory(long companyId,
long repositoryId,
String dirName)
throws PortalException
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
PortalException - if the directory's information was invalid
public void deleteFile(long companyId,
long repositoryId,
String fileName)
throws PortalException,
SystemException
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
PortalException - if the file's information was invalid
SystemException - if a system exception occurred
public void deleteFile(long companyId,
long repositoryId,
String fileName,
String versionLabel)
throws PortalException,
SystemException
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
PortalException - if the file's information was invalid
SystemException - if a system exception occurred
public InputStream getFileAsStream(long companyId,
long repositoryId,
String fileName,
String versionLabel)
throws PortalException,
SystemException
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
PortalException - if the file's information was invalid
SystemException - if a system exception occurred
public String[] getFileNames(long companyId,
long repositoryId)
throws SystemException
SystemException
public String[] getFileNames(long companyId,
long repositoryId,
String dirName)
throws PortalException,
SystemException
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
PortalException - if the directory's information was invalid
SystemException - if a system exception occurred
public long getFileSize(long companyId,
long repositoryId,
String fileName)
throws PortalException,
SystemException
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
PortalException - if the file's information was invalid
SystemException - if a system exception occurred
public boolean hasDirectory(long companyId,
long repositoryId,
String dirName)
throws SystemException
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
SystemException - if a system exception occurred
public boolean hasFile(long companyId,
long repositoryId,
String fileName,
String versionLabel)
throws PortalException,
SystemException
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
PortalException - if the file's information was invalid
SystemException - if a system exception occurred
public void move(String srcDir,
String destDir)
throws SystemException
BaseStoremove(String, String).
move in interface Storemove in class BaseStoresrcDir - the original directory's namedestDir - the new directory's name
SystemException - if a system exception occurred
public void updateFile(long companyId,
long repositoryId,
long newRepositoryId,
String fileName)
throws PortalException,
SystemException
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
PortalException - if the file's information was invalid
SystemException - if a system exception occurred
public void updateFile(long companyId,
long repositoryId,
String fileName,
String newFileName)
throws PortalException,
SystemException
PortalException
SystemException
public void updateFile(long companyId,
long repositoryId,
String fileName,
String versionLabel,
InputStream is)
throws PortalException,
SystemException
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 labelis - the new file's data
PortalException - if the file's information was invalid
SystemException - if a system exception occurred
protected javax.jcr.Node getFileContentNode(long companyId,
long repositoryId,
String fileName,
String versionLabel)
throws PortalException,
SystemException
PortalException
SystemException
protected javax.jcr.Node getFileContentNode(javax.jcr.Session session,
long companyId,
long repositoryId,
String fileName,
String versionLabel)
throws PortalException,
SystemException
PortalException
SystemException
protected javax.jcr.Node getFolderNode(javax.jcr.Node node,
long name)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected javax.jcr.Node getFolderNode(javax.jcr.Node node,
String name)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected javax.jcr.Node getRootNode(javax.jcr.Session session,
long companyId)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
|
Liferay 6.2-ce-ga2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||