Liferay 6.0.5

com.liferay.documentlibrary.util
Class JCRHook

java.lang.Object
  extended by com.liferay.documentlibrary.util.BaseHook
      extended by com.liferay.documentlibrary.util.JCRHook
All Implemented Interfaces:
Hook

public class JCRHook
extends BaseHook


Field Summary
 
Fields inherited from interface com.liferay.documentlibrary.util.Hook
DEFAULT_VERSION
 
Constructor Summary
JCRHook()
           
 
Method Summary
 void addDirectory(long companyId, long repositoryId, String dirName)
           
 void addFile(long companyId, String portletId, long groupId, long repositoryId, String fileName, long fileEntryId, String properties, Date modifiedDate, ServiceContext serviceContext, InputStream is)
           
 void checkRoot(long companyId)
           
protected  void deleteDirectory(long companyId, String portletId, long repositoryId, javax.jcr.Node dirNode)
           
 void deleteDirectory(long companyId, String portletId, long repositoryId, String dirName)
           
 void deleteFile(long companyId, String portletId, long repositoryId, String fileName)
           
 void deleteFile(long companyId, String portletId, long repositoryId, String fileName, String versionNumber)
           
 InputStream getFileAsStream(long companyId, long repositoryId, String fileName, String versionNumber)
           
protected  javax.jcr.Node getFileContentNode(long companyId, long repositoryId, String fileName, String versionNumber)
           
protected  javax.jcr.Node getFileContentNode(javax.jcr.Session session, long companyId, long repositoryId, String fileName, String versionNumber)
           
 String[] getFileNames(long companyId, long repositoryId, String dirName)
           
 long getFileSize(long companyId, long repositoryId, String fileName)
           
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 hasFile(long companyId, long repositoryId, String fileName, String versionNumber)
           
 void move(String srcDir, String destDir)
           
 void reindex(String[] ids)
           
 void updateFile(long companyId, String portletId, long groupId, long repositoryId, long newRepositoryId, String fileName, long fileEntryId)
           
 void updateFile(long companyId, String portletId, long groupId, long repositoryId, String fileName, String newFileName, boolean reindex)
           
 void updateFile(long companyId, String portletId, long groupId, long repositoryId, String fileName, String versionNumber, String sourceFileName, long fileEntryId, String properties, Date modifiedDate, ServiceContext serviceContext, InputStream is)
           
 
Methods inherited from class com.liferay.documentlibrary.util.BaseHook
addFile, addFile, getFile, getFile, getFileAsStream, updateFile, updateFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCRHook

public JCRHook()
Method Detail

addDirectory

public void addDirectory(long companyId,
                         long repositoryId,
                         String dirName)
                  throws PortalException,
                         SystemException
Specified by:
addDirectory in interface Hook
Specified by:
addDirectory in class BaseHook
Throws:
PortalException
SystemException

addFile

public void addFile(long companyId,
                    String portletId,
                    long groupId,
                    long repositoryId,
                    String fileName,
                    long fileEntryId,
                    String properties,
                    Date modifiedDate,
                    ServiceContext serviceContext,
                    InputStream is)
             throws PortalException,
                    SystemException
Specified by:
addFile in interface Hook
Specified by:
addFile in class BaseHook
Throws:
PortalException
SystemException

checkRoot

public void checkRoot(long companyId)
               throws SystemException
Specified by:
checkRoot in interface Hook
Specified by:
checkRoot in class BaseHook
Throws:
SystemException

deleteDirectory

public void deleteDirectory(long companyId,
                            String portletId,
                            long repositoryId,
                            String dirName)
                     throws PortalException
Specified by:
deleteDirectory in interface Hook
Specified by:
deleteDirectory in class BaseHook
Throws:
PortalException

deleteFile

public void deleteFile(long companyId,
                       String portletId,
                       long repositoryId,
                       String fileName)
                throws PortalException,
                       SystemException
Specified by:
deleteFile in interface Hook
Specified by:
deleteFile in class BaseHook
Throws:
PortalException
SystemException

deleteFile

public void deleteFile(long companyId,
                       String portletId,
                       long repositoryId,
                       String fileName,
                       String versionNumber)
                throws PortalException,
                       SystemException
Specified by:
deleteFile in interface Hook
Specified by:
deleteFile in class BaseHook
Throws:
PortalException
SystemException

getFileAsStream

public InputStream getFileAsStream(long companyId,
                                   long repositoryId,
                                   String fileName,
                                   String versionNumber)
                            throws PortalException,
                                   SystemException
Specified by:
getFileAsStream in interface Hook
Specified by:
getFileAsStream in class BaseHook
Throws:
PortalException
SystemException

getFileNames

public String[] getFileNames(long companyId,
                             long repositoryId,
                             String dirName)
                      throws PortalException,
                             SystemException
Specified by:
getFileNames in interface Hook
Specified by:
getFileNames in class BaseHook
Throws:
PortalException
SystemException

getFileSize

public long getFileSize(long companyId,
                        long repositoryId,
                        String fileName)
                 throws PortalException,
                        SystemException
Specified by:
getFileSize in interface Hook
Specified by:
getFileSize in class BaseHook
Throws:
PortalException
SystemException

hasFile

public boolean hasFile(long companyId,
                       long repositoryId,
                       String fileName,
                       String versionNumber)
                throws PortalException,
                       SystemException
Specified by:
hasFile in interface Hook
Specified by:
hasFile in class BaseHook
Throws:
PortalException
SystemException

move

public void move(String srcDir,
                 String destDir)
          throws SystemException
Specified by:
move in interface Hook
Specified by:
move in class BaseHook
Throws:
SystemException

reindex

public void reindex(String[] ids)
             throws SearchException
Specified by:
reindex in interface Hook
Specified by:
reindex in class BaseHook
Throws:
SearchException

updateFile

public void updateFile(long companyId,
                       String portletId,
                       long groupId,
                       long repositoryId,
                       long newRepositoryId,
                       String fileName,
                       long fileEntryId)
                throws PortalException,
                       SystemException
Specified by:
updateFile in interface Hook
Specified by:
updateFile in class BaseHook
Throws:
PortalException
SystemException

updateFile

public void updateFile(long companyId,
                       String portletId,
                       long groupId,
                       long repositoryId,
                       String fileName,
                       String newFileName,
                       boolean reindex)
                throws PortalException,
                       SystemException
Throws:
PortalException
SystemException

updateFile

public void updateFile(long companyId,
                       String portletId,
                       long groupId,
                       long repositoryId,
                       String fileName,
                       String versionNumber,
                       String sourceFileName,
                       long fileEntryId,
                       String properties,
                       Date modifiedDate,
                       ServiceContext serviceContext,
                       InputStream is)
                throws PortalException,
                       SystemException
Specified by:
updateFile in interface Hook
Specified by:
updateFile in class BaseHook
Throws:
PortalException
SystemException

deleteDirectory

protected void deleteDirectory(long companyId,
                               String portletId,
                               long repositoryId,
                               javax.jcr.Node dirNode)
                        throws SearchException
Throws:
SearchException

getFileContentNode

protected javax.jcr.Node getFileContentNode(long companyId,
                                            long repositoryId,
                                            String fileName,
                                            String versionNumber)
                                     throws PortalException,
                                            SystemException
Throws:
PortalException
SystemException

getFileContentNode

protected javax.jcr.Node getFileContentNode(javax.jcr.Session session,
                                            long companyId,
                                            long repositoryId,
                                            String fileName,
                                            String versionNumber)
                                     throws PortalException,
                                            SystemException
Throws:
PortalException
SystemException

getFolderNode

protected javax.jcr.Node getFolderNode(javax.jcr.Node node,
                                       long name)
                                throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getFolderNode

protected javax.jcr.Node getFolderNode(javax.jcr.Node node,
                                       String name)
                                throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getRootNode

protected javax.jcr.Node getRootNode(javax.jcr.Session session,
                                     long companyId)
                              throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

Liferay 6.0.5