|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portlet.documentlibrary.store.BaseStore com.liferay.portlet.documentlibrary.store.CMISStore
public class CMISStore
Field Summary |
---|
Fields inherited from interface com.liferay.portlet.documentlibrary.store.Store |
---|
VERSION_DEFAULT |
Constructor Summary | |
---|---|
CMISStore()
|
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 |
copyFileVersion(long companyId,
long repositoryId,
String fileName,
String fromVersionLabel,
String toVersionLabel)
Creates a new copy of the file version. |
protected org.apache.chemistry.opencmis.client.api.Document |
createDocument(org.apache.chemistry.opencmis.client.api.Folder versioningFolder,
String title,
InputStream is)
|
protected org.apache.chemistry.opencmis.client.api.Folder |
createFolder(org.apache.chemistry.opencmis.client.api.ObjectId parentFolderId,
String name)
|
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. |
protected org.apache.chemistry.opencmis.client.api.Folder |
getCompanyFolder(long companyId)
|
protected org.apache.chemistry.opencmis.client.api.Document |
getDocument(org.apache.chemistry.opencmis.client.api.Folder parentFolder,
String name)
|
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. |
protected org.apache.chemistry.opencmis.client.api.Folder |
getFolder(org.apache.chemistry.opencmis.client.api.Folder parentFolder,
String name)
|
protected List<org.apache.chemistry.opencmis.client.api.Folder> |
getFolders(org.apache.chemistry.opencmis.client.api.Folder folder)
|
String |
getHeadVersionLabel(long companyId,
long repositoryId,
String dirName)
|
protected org.apache.chemistry.opencmis.client.api.Folder |
getRepositoryFolder(long companyId,
long repositoryId)
|
protected org.apache.chemistry.opencmis.client.api.Document |
getVersionedDocument(long companyId,
long repositoryId,
String fileName,
String versionLabel)
|
protected org.apache.chemistry.opencmis.client.api.Folder |
getVersioningFolder(long companyId,
long repositoryId,
String fileName,
boolean create)
|
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. |
void |
updateFileVersion(long companyId,
long repositoryId,
String fileName,
String fromVersionLabel,
String toVersionLabel)
Update's a file version label. |
Methods inherited from class com.liferay.portlet.documentlibrary.store.BaseStore |
---|
addFile, addFile, getFile, getFile, getFileAsBytes, getFileAsBytes, getFileAsStream, hasFile, updateFile, updateFile |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CMISStore()
Method Detail |
---|
public void addDirectory(long companyId, long repositoryId, String dirName)
BaseStore
addDirectory
in interface Store
addDirectory
in class BaseStore
companyId
- the primary key of the companyrepositoryId
- the primary key of the data repository (optionally
CompanyConstants#SYSTEM
)dirName
- the directory's namepublic void addFile(long companyId, long repositoryId, String fileName, InputStream is) throws PortalException
BaseStore
InputStream
object.
addFile
in interface Store
addFile
in class BaseStore
companyId
- 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 invalidpublic void checkRoot(long companyId)
BaseStore
JCRStore.checkRoot(long)
.
checkRoot
in interface Store
checkRoot
in class BaseStore
companyId
- the primary key of the companypublic void copyFileVersion(long companyId, long repositoryId, String fileName, String fromVersionLabel, String toVersionLabel) throws PortalException
BaseStore
This method should be overrided if a more optimized approach can be used
(e.g., FileSystemStore#copyFileVersion(long, long, String, String,
String, String)
).
copyFileVersion
in interface Store
copyFileVersion
in class BaseStore
companyId
- 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 label
PortalException
- if the file's information was invalidpublic void deleteDirectory(long companyId, long repositoryId, String dirName)
BaseStore
deleteDirectory
in interface Store
deleteDirectory
in class BaseStore
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) throws PortalException
BaseStore
deleteFile
in interface Store
deleteFile
in class BaseStore
companyId
- 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 invalidpublic void deleteFile(long companyId, long repositoryId, String fileName, String versionLabel) throws PortalException
BaseStore
deleteFile
in interface Store
deleteFile
in class BaseStore
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 label
PortalException
- if the file's information was invalidpublic InputStream getFileAsStream(long companyId, long repositoryId, String fileName, String versionLabel) throws PortalException
BaseStore
InputStream
object.
getFileAsStream
in interface Store
getFileAsStream
in class BaseStore
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 label
InputStream
object with the file's name
PortalException
- if the file's information was invalidpublic String[] getFileNames(long companyId, long repositoryId)
public String[] getFileNames(long companyId, long repositoryId, String dirName)
BaseStore
getFileNames
in interface Store
getFileNames
in class BaseStore
companyId
- 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 PortalException
BaseStore
getFileSize
in interface Store
getFileSize
in class BaseStore
companyId
- 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 invalidpublic String getHeadVersionLabel(long companyId, long repositoryId, String dirName) throws NoSuchFileException
NoSuchFileException
public boolean hasDirectory(long companyId, long repositoryId, String dirName)
BaseStore
true
if the directory exists.
hasDirectory
in interface Store
hasDirectory
in class BaseStore
companyId
- 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
otherwisepublic boolean hasFile(long companyId, long repositoryId, String fileName, String versionLabel)
BaseStore
true
if the file exists.
hasFile
in interface Store
hasFile
in class BaseStore
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 label
true
if the file exists; false
otherwisepublic void move(String srcDir, String destDir)
BaseStore
JCRStore.move(String, String)
.
move
in interface Store
move
in class BaseStore
srcDir
- the original directory's namedestDir
- the new directory's namepublic void updateFile(long companyId, long repositoryId, long newRepositoryId, String fileName)
BaseStore
updateFile
in interface Store
updateFile
in class BaseStore
companyId
- the primary key of the companyrepositoryId
- the primary key of the data repositorynewRepositoryId
- the primary key of the new data repositoryfileName
- the file's namepublic void updateFile(long companyId, long repositoryId, String fileName, String newFileName)
public void updateFile(long companyId, long repositoryId, String fileName, String versionLabel, InputStream is) throws PortalException
BaseStore
InputStream
object.
updateFile
in interface Store
updateFile
in class BaseStore
companyId
- 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 invalidpublic void updateFileVersion(long companyId, long repositoryId, String fileName, String fromVersionLabel, String toVersionLabel) throws PortalException
BaseStore
#copyFileVersion(long,
long, String, String, String, String)
except that the old file version
is deleted.
updateFileVersion
in interface Store
updateFileVersion
in class BaseStore
companyId
- 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 label
PortalException
- if the file's information was invalidprotected org.apache.chemistry.opencmis.client.api.Document createDocument(org.apache.chemistry.opencmis.client.api.Folder versioningFolder, String title, InputStream is)
protected org.apache.chemistry.opencmis.client.api.Folder createFolder(org.apache.chemistry.opencmis.client.api.ObjectId parentFolderId, String name)
protected org.apache.chemistry.opencmis.client.api.Folder getCompanyFolder(long companyId)
protected org.apache.chemistry.opencmis.client.api.Document getDocument(org.apache.chemistry.opencmis.client.api.Folder parentFolder, String name)
protected org.apache.chemistry.opencmis.client.api.Folder getFolder(org.apache.chemistry.opencmis.client.api.Folder parentFolder, String name)
protected List<org.apache.chemistry.opencmis.client.api.Folder> getFolders(org.apache.chemistry.opencmis.client.api.Folder folder)
protected org.apache.chemistry.opencmis.client.api.Folder getRepositoryFolder(long companyId, long repositoryId)
protected org.apache.chemistry.opencmis.client.api.Document getVersionedDocument(long companyId, long repositoryId, String fileName, String versionLabel) throws NoSuchFileException
NoSuchFileException
protected org.apache.chemistry.opencmis.client.api.Folder getVersioningFolder(long companyId, long repositoryId, String fileName, boolean create)
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |