org.enhydra.shark.repositorypersistence
Class FileSystemRepositoryPersistenceManager

java.lang.Object
  extended by org.enhydra.shark.repositorypersistence.FileSystemRepositoryPersistenceManager
All Implemented Interfaces:
RepositoryPersistenceManager

public class FileSystemRepositoryPersistenceManager
extends java.lang.Object
implements RepositoryPersistenceManager

File system implementation of Repository persistence interface.

Author:
Sasa Bojanic

Constructor Summary
FileSystemRepositoryPersistenceManager()
           
 
Method Summary
 void addXPDLReference(WMSessionHandle shandle, java.lang.String referredXPDLId, java.lang.String referringXPDLId, java.lang.String referringXPDLVersion, int referredXPDLNumber)
           
 void clearRepository(WMSessionHandle shandle)
           
 void configure(CallbackUtilities cus)
           
 void deleteFromHistory(WMSessionHandle shandle, java.lang.String xpdlId, java.lang.String xpdlVersion)
           
 void deleteXPDL(WMSessionHandle shandle, java.lang.String xpdlId, java.lang.String xpdlVersion)
           
 boolean doesXPDLExist(WMSessionHandle shandle, java.lang.String xpdlId)
           
 boolean doesXPDLExist(WMSessionHandle shandle, java.lang.String xpdlId, java.lang.String xpdlVersion)
           
 java.lang.String getCurrentVersion(WMSessionHandle shandle, java.lang.String xpdlId)
           
 java.util.List getExistingXPDLIds(WMSessionHandle shandle)
           
 java.lang.String getNextVersion(WMSessionHandle shandle, java.lang.String xpdlId)
           
 java.util.List getReferredXPDLIds(WMSessionHandle shandle, java.lang.String refferingXPDLId, java.lang.String refferingXPDLVersion)
           
 java.util.List getReferringXPDLIds(WMSessionHandle shandle, java.lang.String referredXPDLId)
           
 java.util.List getReferringXPDLVersions(WMSessionHandle shandle, java.lang.String referredXPDLId, java.lang.String refferingXPDLId)
           
 byte[] getSerializedXPDLObject(WMSessionHandle shandle, java.lang.String xpdlId)
           
 byte[] getSerializedXPDLObject(WMSessionHandle shandle, java.lang.String xpdlId, java.lang.String xpdlVersion)
           
 long getSerializedXPDLObjectVersion(WMSessionHandle shandle, java.lang.String xpdlId, java.lang.String xpdlVersion)
           
 byte[] getXPDL(WMSessionHandle shandle, java.lang.String xpdlId)
           
 byte[] getXPDL(WMSessionHandle shandle, java.lang.String xpdlId, java.lang.String xpdlVersion)
           
 long getXPDLUploadTime(WMSessionHandle shandle, java.lang.String xpdlId, java.lang.String xpdlVersion)
           
 java.util.List getXPDLVersions(WMSessionHandle shandle, java.lang.String xpdlId)
           
 void moveToHistory(WMSessionHandle shandle, java.lang.String xpdlId, java.lang.String xpdlVersion)
           
 void updateXPDL(WMSessionHandle shandle, java.lang.String xpdlId, java.lang.String xpdlVersion, byte[] xpdl, byte[] serializedPkg, long xpdlClassVer)
           
 void uploadXPDL(WMSessionHandle shandle, java.lang.String xpdlId, byte[] xpdl, byte[] serializedPkg, long xpdlClassVer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemRepositoryPersistenceManager

public FileSystemRepositoryPersistenceManager()
Method Detail

configure

public void configure(CallbackUtilities cus)
               throws java.lang.Exception
Specified by:
configure in interface RepositoryPersistenceManager
Throws:
java.lang.Exception

uploadXPDL

public void uploadXPDL(WMSessionHandle shandle,
                       java.lang.String xpdlId,
                       byte[] xpdl,
                       byte[] serializedPkg,
                       long xpdlClassVer)
                throws RepositoryException
Specified by:
uploadXPDL in interface RepositoryPersistenceManager
Throws:
RepositoryException

updateXPDL

public void updateXPDL(WMSessionHandle shandle,
                       java.lang.String xpdlId,
                       java.lang.String xpdlVersion,
                       byte[] xpdl,
                       byte[] serializedPkg,
                       long xpdlClassVer)
                throws RepositoryException
Specified by:
updateXPDL in interface RepositoryPersistenceManager
Throws:
RepositoryException

deleteXPDL

public void deleteXPDL(WMSessionHandle shandle,
                       java.lang.String xpdlId,
                       java.lang.String xpdlVersion)
                throws RepositoryException
Specified by:
deleteXPDL in interface RepositoryPersistenceManager
Throws:
RepositoryException

moveToHistory

public void moveToHistory(WMSessionHandle shandle,
                          java.lang.String xpdlId,
                          java.lang.String xpdlVersion)
                   throws RepositoryException
Specified by:
moveToHistory in interface RepositoryPersistenceManager
Throws:
RepositoryException

deleteFromHistory

public void deleteFromHistory(WMSessionHandle shandle,
                              java.lang.String xpdlId,
                              java.lang.String xpdlVersion)
                       throws RepositoryException
Specified by:
deleteFromHistory in interface RepositoryPersistenceManager
Throws:
RepositoryException

clearRepository

public void clearRepository(WMSessionHandle shandle)
                     throws RepositoryException
Specified by:
clearRepository in interface RepositoryPersistenceManager
Throws:
RepositoryException

getCurrentVersion

public java.lang.String getCurrentVersion(WMSessionHandle shandle,
                                          java.lang.String xpdlId)
                                   throws RepositoryException
Specified by:
getCurrentVersion in interface RepositoryPersistenceManager
Throws:
RepositoryException

getNextVersion

public java.lang.String getNextVersion(WMSessionHandle shandle,
                                       java.lang.String xpdlId)
                                throws RepositoryException
Specified by:
getNextVersion in interface RepositoryPersistenceManager
Throws:
RepositoryException

getSerializedXPDLObjectVersion

public long getSerializedXPDLObjectVersion(WMSessionHandle shandle,
                                           java.lang.String xpdlId,
                                           java.lang.String xpdlVersion)
                                    throws RepositoryException
Specified by:
getSerializedXPDLObjectVersion in interface RepositoryPersistenceManager
Throws:
RepositoryException

getXPDLUploadTime

public long getXPDLUploadTime(WMSessionHandle shandle,
                              java.lang.String xpdlId,
                              java.lang.String xpdlVersion)
                       throws RepositoryException
Specified by:
getXPDLUploadTime in interface RepositoryPersistenceManager
Throws:
RepositoryException

getXPDL

public byte[] getXPDL(WMSessionHandle shandle,
                      java.lang.String xpdlId)
               throws RepositoryException
Specified by:
getXPDL in interface RepositoryPersistenceManager
Throws:
RepositoryException

getSerializedXPDLObject

public byte[] getSerializedXPDLObject(WMSessionHandle shandle,
                                      java.lang.String xpdlId)
                               throws RepositoryException
Specified by:
getSerializedXPDLObject in interface RepositoryPersistenceManager
Throws:
RepositoryException

getXPDL

public byte[] getXPDL(WMSessionHandle shandle,
                      java.lang.String xpdlId,
                      java.lang.String xpdlVersion)
               throws RepositoryException
Specified by:
getXPDL in interface RepositoryPersistenceManager
Throws:
RepositoryException

getSerializedXPDLObject

public byte[] getSerializedXPDLObject(WMSessionHandle shandle,
                                      java.lang.String xpdlId,
                                      java.lang.String xpdlVersion)
                               throws RepositoryException
Specified by:
getSerializedXPDLObject in interface RepositoryPersistenceManager
Throws:
RepositoryException

getXPDLVersions

public java.util.List getXPDLVersions(WMSessionHandle shandle,
                                      java.lang.String xpdlId)
                               throws RepositoryException
Specified by:
getXPDLVersions in interface RepositoryPersistenceManager
Throws:
RepositoryException

doesXPDLExist

public boolean doesXPDLExist(WMSessionHandle shandle,
                             java.lang.String xpdlId)
                      throws RepositoryException
Specified by:
doesXPDLExist in interface RepositoryPersistenceManager
Throws:
RepositoryException

doesXPDLExist

public boolean doesXPDLExist(WMSessionHandle shandle,
                             java.lang.String xpdlId,
                             java.lang.String xpdlVersion)
                      throws RepositoryException
Specified by:
doesXPDLExist in interface RepositoryPersistenceManager
Throws:
RepositoryException

getExistingXPDLIds

public java.util.List getExistingXPDLIds(WMSessionHandle shandle)
                                  throws RepositoryException
Specified by:
getExistingXPDLIds in interface RepositoryPersistenceManager
Throws:
RepositoryException

addXPDLReference

public void addXPDLReference(WMSessionHandle shandle,
                             java.lang.String referredXPDLId,
                             java.lang.String referringXPDLId,
                             java.lang.String referringXPDLVersion,
                             int referredXPDLNumber)
                      throws RepositoryException
Specified by:
addXPDLReference in interface RepositoryPersistenceManager
Throws:
RepositoryException

getReferringXPDLIds

public java.util.List getReferringXPDLIds(WMSessionHandle shandle,
                                          java.lang.String referredXPDLId)
                                   throws RepositoryException
Specified by:
getReferringXPDLIds in interface RepositoryPersistenceManager
Throws:
RepositoryException

getReferringXPDLVersions

public java.util.List getReferringXPDLVersions(WMSessionHandle shandle,
                                               java.lang.String referredXPDLId,
                                               java.lang.String refferingXPDLId)
                                        throws RepositoryException
Specified by:
getReferringXPDLVersions in interface RepositoryPersistenceManager
Throws:
RepositoryException

getReferredXPDLIds

public java.util.List getReferredXPDLIds(WMSessionHandle shandle,
                                         java.lang.String refferingXPDLId,
                                         java.lang.String refferingXPDLVersion)
                                  throws RepositoryException
Specified by:
getReferredXPDLIds in interface RepositoryPersistenceManager
Throws:
RepositoryException