mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-02 17:35:18 +00:00
Big rearrangement of package structure to allow as many classes
and interfaces to be package local as possible. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3381 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
parent
ff042f1988
commit
beb44ec6ae
@ -85,73 +85,73 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="issuerDAO" class="org.alfresco.repo.avm.hibernate.IssuerDAOHibernate">
|
<bean id="issuerDAO" class="org.alfresco.repo.avm.IssuerDAOHibernate">
|
||||||
<property name="sessionFactory">
|
<property name="sessionFactory">
|
||||||
<ref bean="sessionFactory"/>
|
<ref bean="sessionFactory"/>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="nodeDAO" class="org.alfresco.repo.avm.hibernate.AVMNodeDAOHibernate">
|
<bean id="nodeDAO" class="org.alfresco.repo.avm.AVMNodeDAOHibernate">
|
||||||
<property name="sessionFactory">
|
<property name="sessionFactory">
|
||||||
<ref bean="sessionFactory"/>
|
<ref bean="sessionFactory"/>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="avmStoreDAO" class="org.alfresco.repo.avm.hibernate.AVMStoreDAOHibernate">
|
<bean id="avmStoreDAO" class="org.alfresco.repo.avm.AVMStoreDAOHibernate">
|
||||||
<property name="sessionFactory">
|
<property name="sessionFactory">
|
||||||
<ref bean="sessionFactory"/>
|
<ref bean="sessionFactory"/>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="versionRootDAO" class="org.alfresco.repo.avm.hibernate.VersionRootDAOHibernate">
|
<bean id="versionRootDAO" class="org.alfresco.repo.avm.VersionRootDAOHibernate">
|
||||||
<property name="sessionFactory">
|
<property name="sessionFactory">
|
||||||
<ref bean="sessionFactory"/>
|
<ref bean="sessionFactory"/>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="fileContentDAO" class="org.alfresco.repo.avm.hibernate.FileContentDAOHibernate">
|
<bean id="fileContentDAO" class="org.alfresco.repo.avm.FileContentDAOHibernate">
|
||||||
<property name="sessionFactory">
|
<property name="sessionFactory">
|
||||||
<ref bean="sessionFactory"/>
|
<ref bean="sessionFactory"/>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="childEntryDAO" class="org.alfresco.repo.avm.hibernate.ChildEntryDAOHibernate">
|
<bean id="childEntryDAO" class="org.alfresco.repo.avm.ChildEntryDAOHibernate">
|
||||||
<property name="sessionFactory">
|
<property name="sessionFactory">
|
||||||
<ref bean="sessionFactory"/>
|
<ref bean="sessionFactory"/>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="historyLinkDAO" class="org.alfresco.repo.avm.hibernate.HistoryLinkDAOHibernate">
|
<bean id="historyLinkDAO" class="org.alfresco.repo.avm.HistoryLinkDAOHibernate">
|
||||||
<property name="sessionFactory">
|
<property name="sessionFactory">
|
||||||
<ref bean="sessionFactory"/>
|
<ref bean="sessionFactory"/>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="mergeLinkDAO" class="org.alfresco.repo.avm.hibernate.MergeLinkDAOHibernate">
|
<bean id="mergeLinkDAO" class="org.alfresco.repo.avm.MergeLinkDAOHibernate">
|
||||||
<property name="sessionFactory">
|
<property name="sessionFactory">
|
||||||
<ref bean="sessionFactory"/>
|
<ref bean="sessionFactory"/>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="deletedChildDAO" class="org.alfresco.repo.avm.hibernate.DeletedChildDAOHibernate">
|
<bean id="deletedChildDAO" class="org.alfresco.repo.avm.DeletedChildDAOHibernate">
|
||||||
<property name="sessionFactory">
|
<property name="sessionFactory">
|
||||||
<ref bean="sessionFactory"/>
|
<ref bean="sessionFactory"/>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="newInAVMStoreDAO" class="org.alfresco.repo.avm.hibernate.NewInAVMStoreDAOHibernate">
|
<bean id="newInAVMStoreDAO" class="org.alfresco.repo.avm.NewInAVMStoreDAOHibernate">
|
||||||
<property name="sessionFactory">
|
<property name="sessionFactory">
|
||||||
<ref bean="sessionFactory"/>
|
<ref bean="sessionFactory"/>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="avmNodePropertyDAO" class="org.alfresco.repo.avm.hibernate.AVMNodePropertyDAOHibernate">
|
<bean id="avmNodePropertyDAO" class="org.alfresco.repo.avm.AVMNodePropertyDAOHibernate">
|
||||||
<property name="sessionFactory">
|
<property name="sessionFactory">
|
||||||
<ref bean="sessionFactory"/>
|
<ref bean="sessionFactory"/>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="avmStorePropertyDAO" class="org.alfresco.repo.avm.hibernate.AVMStorePropertyDAOHibernate">
|
<bean id="avmStorePropertyDAO" class="org.alfresco.repo.avm.AVMStorePropertyDAOHibernate">
|
||||||
<property name="sessionFactory">
|
<property name="sessionFactory">
|
||||||
<ref bean="sessionFactory"/>
|
<ref bean="sessionFactory"/>
|
||||||
</property>
|
</property>
|
||||||
@ -237,7 +237,7 @@
|
|||||||
|
|
||||||
<!-- The Hibernate Transaction wrapper. -->
|
<!-- The Hibernate Transaction wrapper. -->
|
||||||
<bean id="retryingTransaction"
|
<bean id="retryingTransaction"
|
||||||
class="org.alfresco.repo.avm.hibernate.HibernateRetryingTransaction">
|
class="org.alfresco.repo.avm.HibernateRetryingTransaction">
|
||||||
<property name="sessionFactory">
|
<property name="sessionFactory">
|
||||||
<ref bean="sessionFactory"/>
|
<ref bean="sessionFactory"/>
|
||||||
</property>
|
</property>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<import resource="classpath:alfresco/avm-base-context.xml"/>
|
<import resource="file:config/alfresco/avm-base-context.xml"/>
|
||||||
|
|
||||||
<bean id="bulkLoader" class="org.alfresco.repo.avm.util.BulkLoader">
|
<bean id="bulkLoader" class="org.alfresco.repo.avm.util.BulkLoader">
|
||||||
<property name="avmService">
|
<property name="avmService">
|
||||||
|
@ -13,6 +13,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<import resource="classpath:alfresco/avm-base-context.xml"/>
|
<import resource="file:config/alfresco/avm-base-context.xml"/>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
@ -8,14 +8,14 @@ package org.alfresco.repo.avm;
|
|||||||
* point for access to needed global instances.
|
* point for access to needed global instances.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class AVMContext
|
class AVMContext
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The single instance of an AVMContext.
|
* The single instance of an AVMContext.
|
||||||
*/
|
*/
|
||||||
public static AVMContext fgInstance;
|
public static AVMContext fgInstance;
|
||||||
|
|
||||||
public AVMContext()
|
AVMContext()
|
||||||
{
|
{
|
||||||
fgInstance = this;
|
fgInstance = this;
|
||||||
}
|
}
|
||||||
|
@ -222,8 +222,7 @@ class AVMCrawler implements Runnable
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
e.printStackTrace(System.err);
|
e.printStackTrace(System.err);
|
||||||
return;
|
throw new AVMException("Failure", e);
|
||||||
// throw new AVMException("Failure", e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ import org.alfresco.service.namespace.QName;
|
|||||||
* The Interface for versionable objects.
|
* The Interface for versionable objects.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface AVMNode
|
interface AVMNode
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Set the ancestor of this node.
|
* Set the ancestor of this node.
|
||||||
|
@ -22,7 +22,7 @@ import java.util.List;
|
|||||||
* DAO for AVMNodes interface.
|
* DAO for AVMNodes interface.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface AVMNodeDAO
|
interface AVMNodeDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Save the given node, having never been saved before.
|
* Save the given node, having never been saved before.
|
||||||
|
@ -15,16 +15,10 @@
|
|||||||
* License.
|
* License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.alfresco.repo.avm.hibernate;
|
package org.alfresco.repo.avm;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.alfresco.repo.avm.AVMNode;
|
|
||||||
import org.alfresco.repo.avm.AVMNodeDAO;
|
|
||||||
import org.alfresco.repo.avm.AVMNodeImpl;
|
|
||||||
import org.alfresco.repo.avm.AVMNodeUnwrapper;
|
|
||||||
import org.alfresco.repo.avm.DirectoryNode;
|
|
||||||
import org.alfresco.repo.avm.AVMStore;
|
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
|
|
||||||
@ -32,7 +26,7 @@ import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
|||||||
* @author britt
|
* @author britt
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class AVMNodeDAOHibernate extends HibernateDaoSupport implements
|
class AVMNodeDAOHibernate extends HibernateDaoSupport implements
|
||||||
AVMNodeDAO
|
AVMNodeDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
@ -29,7 +29,7 @@ import org.alfresco.service.namespace.QName;
|
|||||||
* Base class for all repository file system like objects.
|
* Base class for all repository file system like objects.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public abstract class AVMNodeImpl implements AVMNode, Serializable
|
abstract class AVMNodeImpl implements AVMNode, Serializable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The Object ID.
|
* The Object ID.
|
||||||
|
@ -24,7 +24,7 @@ import org.alfresco.service.namespace.QName;
|
|||||||
* Alfresco Properties for AVM..
|
* Alfresco Properties for AVM..
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface AVMNodeProperty
|
interface AVMNodeProperty
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Set the node that owns this property.
|
* Set the node that owns this property.
|
||||||
|
@ -25,7 +25,7 @@ import org.alfresco.service.namespace.QName;
|
|||||||
* DAO for AVMNodeProperty.
|
* DAO for AVMNodeProperty.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface AVMNodePropertyDAO
|
interface AVMNodePropertyDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Save the given AVMNodeProperty.
|
* Save the given AVMNodeProperty.
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
package org.alfresco.repo.avm.hibernate;
|
package org.alfresco.repo.avm;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.alfresco.repo.avm.AVMNode;
|
|
||||||
import org.alfresco.repo.avm.AVMNodeProperty;
|
|
||||||
import org.alfresco.repo.avm.AVMNodePropertyDAO;
|
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
@ -13,7 +10,7 @@ import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
|||||||
* Hibernate implemenation for DAO for AVMNodeProperties.
|
* Hibernate implemenation for DAO for AVMNodeProperties.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class AVMNodePropertyDAOHibernate extends HibernateDaoSupport
|
class AVMNodePropertyDAOHibernate extends HibernateDaoSupport
|
||||||
implements AVMNodePropertyDAO
|
implements AVMNodePropertyDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
@ -23,10 +23,10 @@ import org.alfresco.repo.domain.PropertyValue;
|
|||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* A Property attached to an AVMNode.
|
||||||
* @author britt
|
* @author britt
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class AVMNodePropertyImpl implements AVMNodeProperty, Serializable
|
class AVMNodePropertyImpl implements AVMNodeProperty, Serializable
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = -7194228119659288619L;
|
private static final long serialVersionUID = -7194228119659288619L;
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ import org.hibernate.proxy.HibernateProxy;
|
|||||||
* types are fundamentally broken.
|
* types are fundamentally broken.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class AVMNodeUnwrapper
|
class AVMNodeUnwrapper
|
||||||
{
|
{
|
||||||
public static AVMNode Unwrap(AVMNode node)
|
public static AVMNode Unwrap(AVMNode node)
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,7 @@ import org.alfresco.service.namespace.QName;
|
|||||||
* the implementors of the operations specified by AVMService.
|
* the implementors of the operations specified by AVMService.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class AVMRepository
|
class AVMRepository
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The single instance of AVMRepository.
|
* The single instance of AVMRepository.
|
||||||
@ -70,7 +70,7 @@ public class AVMRepository
|
|||||||
/**
|
/**
|
||||||
* Create a new one.
|
* Create a new one.
|
||||||
*/
|
*/
|
||||||
public AVMRepository()
|
AVMRepository()
|
||||||
{
|
{
|
||||||
fLookupCount = new ThreadLocal<Integer>();
|
fLookupCount = new ThreadLocal<Integer>();
|
||||||
fgInstance = this;
|
fgInstance = this;
|
||||||
@ -112,7 +112,7 @@ public class AVMRepository
|
|||||||
fLayerIssuer = layerIssuer;
|
fLayerIssuer = layerIssuer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init()
|
void init()
|
||||||
{
|
{
|
||||||
File storageDir = new File(fStorage);
|
File storageDir = new File(fStorage);
|
||||||
storageDir.mkdirs();
|
storageDir.mkdirs();
|
||||||
|
@ -37,7 +37,7 @@ import org.apache.log4j.Logger;
|
|||||||
* Implements the AVMService. Stub.
|
* Implements the AVMService. Stub.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class AVMServiceImpl implements AVMService
|
class AVMServiceImpl implements AVMService
|
||||||
{
|
{
|
||||||
private static Logger fgLogger = Logger.getLogger(AVMServiceImpl.class);
|
private static Logger fgLogger = Logger.getLogger(AVMServiceImpl.class);
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ public class AVMServiceImpl implements AVMService
|
|||||||
/**
|
/**
|
||||||
* Basic constructor for the service.
|
* Basic constructor for the service.
|
||||||
*/
|
*/
|
||||||
public AVMServiceImpl()
|
AVMServiceImpl()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ public class AVMServiceImpl implements AVMService
|
|||||||
* Final initialization of the service. Must be called only on a
|
* Final initialization of the service. Must be called only on a
|
||||||
* fully initialized instance.
|
* fully initialized instance.
|
||||||
*/
|
*/
|
||||||
public void init()
|
void init()
|
||||||
{
|
{
|
||||||
if (fInitialize)
|
if (fInitialize)
|
||||||
{
|
{
|
||||||
|
@ -33,7 +33,7 @@ import org.alfresco.service.namespace.QName;
|
|||||||
* and layering operations.
|
* and layering operations.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface AVMStore
|
interface AVMStore
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* This returns the next version in this store that will be snapshotted.
|
* This returns the next version in this store that will be snapshotted.
|
||||||
|
@ -23,7 +23,7 @@ import java.util.List;
|
|||||||
* DAO for Repositories.
|
* DAO for Repositories.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface AVMStoreDAO
|
interface AVMStoreDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Save an AVMStore, never before saved.
|
* Save an AVMStore, never before saved.
|
||||||
|
@ -15,13 +15,10 @@
|
|||||||
* License.
|
* License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.alfresco.repo.avm.hibernate;
|
package org.alfresco.repo.avm;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.alfresco.repo.avm.AVMStore;
|
|
||||||
import org.alfresco.repo.avm.AVMStoreDAO;
|
|
||||||
import org.alfresco.repo.avm.AVMStoreImpl;
|
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
|
|
||||||
@ -29,7 +26,7 @@ import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
|||||||
* The Hibernate version for AVMStoreDAO
|
* The Hibernate version for AVMStoreDAO
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class AVMStoreDAOHibernate extends HibernateDaoSupport implements
|
class AVMStoreDAOHibernate extends HibernateDaoSupport implements
|
||||||
AVMStoreDAO
|
AVMStoreDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
@ -41,7 +41,7 @@ import org.alfresco.service.namespace.QName;
|
|||||||
* operation.
|
* operation.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class AVMStoreImpl implements AVMStore, Serializable
|
class AVMStoreImpl implements AVMStore, Serializable
|
||||||
{
|
{
|
||||||
static final long serialVersionUID = -1485972568675732904L;
|
static final long serialVersionUID = -1485972568675732904L;
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ import org.alfresco.service.namespace.QName;
|
|||||||
* Arbitrary properties associated with AVMStores.
|
* Arbitrary properties associated with AVMStores.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface AVMStoreProperty
|
interface AVMStoreProperty
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Set the AVMStore.
|
* Set the AVMStore.
|
||||||
|
@ -25,7 +25,7 @@ import org.alfresco.service.namespace.QName;
|
|||||||
* The DAO interface for AVMStoreProperties.
|
* The DAO interface for AVMStoreProperties.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface AVMStorePropertyDAO
|
interface AVMStorePropertyDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Persist a property.
|
* Persist a property.
|
||||||
|
@ -15,13 +15,10 @@
|
|||||||
* License.
|
* License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.alfresco.repo.avm.hibernate;
|
package org.alfresco.repo.avm;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.alfresco.repo.avm.AVMStore;
|
|
||||||
import org.alfresco.repo.avm.AVMStoreProperty;
|
|
||||||
import org.alfresco.repo.avm.AVMStorePropertyDAO;
|
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
@ -30,7 +27,7 @@ import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
|||||||
* The Hibernate implementation of the DAO for AVMNodeProperties.
|
* The Hibernate implementation of the DAO for AVMNodeProperties.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class AVMStorePropertyDAOHibernate extends HibernateDaoSupport implements AVMStorePropertyDAO
|
class AVMStorePropertyDAOHibernate extends HibernateDaoSupport implements AVMStorePropertyDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Persist a property.
|
* Persist a property.
|
@ -26,7 +26,7 @@ import org.alfresco.service.namespace.QName;
|
|||||||
* Simple bean to hold properties attached to AVMStores.
|
* Simple bean to hold properties attached to AVMStores.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class AVMStorePropertyImpl implements AVMStoreProperty, Serializable
|
class AVMStorePropertyImpl implements AVMStoreProperty, Serializable
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = -5419606158990318723L;
|
private static final long serialVersionUID = -5419606158990318723L;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ package org.alfresco.repo.avm;
|
|||||||
* Ownership, timestamps, later perhaps ACLs
|
* Ownership, timestamps, later perhaps ACLs
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface BasicAttributes
|
interface BasicAttributes
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Set the creator of the node.
|
* Set the creator of the node.
|
||||||
|
@ -10,7 +10,7 @@ import java.io.Serializable;
|
|||||||
* Implementation of the BasicAttributesBean.
|
* Implementation of the BasicAttributesBean.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class BasicAttributesImpl implements BasicAttributes, Serializable
|
class BasicAttributesImpl implements BasicAttributes, Serializable
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = -3796354564923670005L;
|
private static final long serialVersionUID = -3796354564923670005L;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ package org.alfresco.repo.avm;
|
|||||||
* This interface represents an entry in a directory.
|
* This interface represents an entry in a directory.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface ChildEntry
|
interface ChildEntry
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Set the name of the child.
|
* Set the name of the child.
|
||||||
|
@ -23,7 +23,7 @@ import java.util.List;
|
|||||||
* DAO for ChildEntries.
|
* DAO for ChildEntries.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface ChildEntryDAO
|
interface ChildEntryDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Save an unsaved ChildEntry.
|
* Save an unsaved ChildEntry.
|
||||||
|
@ -15,16 +15,11 @@
|
|||||||
* License.
|
* License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.alfresco.repo.avm.hibernate;
|
package org.alfresco.repo.avm;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.alfresco.repo.avm.AVMNode;
|
|
||||||
import org.alfresco.repo.avm.ChildEntry;
|
|
||||||
import org.alfresco.repo.avm.ChildEntryDAO;
|
|
||||||
import org.alfresco.repo.avm.ChildEntryImpl;
|
|
||||||
import org.alfresco.repo.avm.DirectoryNode;
|
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
|
|
||||||
@ -32,7 +27,7 @@ import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
|||||||
* The Hibernate version of the ChildEntry DAO.
|
* The Hibernate version of the ChildEntry DAO.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class ChildEntryDAOHibernate extends HibernateDaoSupport implements
|
class ChildEntryDAOHibernate extends HibernateDaoSupport implements
|
||||||
ChildEntryDAO
|
ChildEntryDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
@ -23,7 +23,7 @@ import java.io.Serializable;
|
|||||||
* An entry in a directory. Contains a name, parent, and child.
|
* An entry in a directory. Contains a name, parent, and child.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class ChildEntryImpl implements ChildEntry, Serializable
|
class ChildEntryImpl implements ChildEntry, Serializable
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = -307752114272916930L;
|
private static final long serialVersionUID = -307752114272916930L;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ package org.alfresco.repo.avm;
|
|||||||
* Interface to a deleted directory entry in a layered directory.
|
* Interface to a deleted directory entry in a layered directory.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface DeletedChild
|
interface DeletedChild
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Get the name of the deleted child.
|
* Get the name of the deleted child.
|
||||||
|
@ -23,7 +23,7 @@ import java.util.List;
|
|||||||
* DAO for DeletedChildren.
|
* DAO for DeletedChildren.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface DeletedChildDAO
|
interface DeletedChildDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Save an unsaved DeletedChild.
|
* Save an unsaved DeletedChild.
|
||||||
|
@ -15,14 +15,10 @@
|
|||||||
* License.
|
* License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.alfresco.repo.avm.hibernate;
|
package org.alfresco.repo.avm;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.alfresco.repo.avm.AVMNode;
|
|
||||||
import org.alfresco.repo.avm.DeletedChild;
|
|
||||||
import org.alfresco.repo.avm.DeletedChildDAO;
|
|
||||||
import org.alfresco.repo.avm.LayeredDirectoryNode;
|
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
|
|
||||||
@ -30,7 +26,7 @@ import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
|||||||
* Hibernate implementation of DAO for DeletedChildren.
|
* Hibernate implementation of DAO for DeletedChildren.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class DeletedChildDAOHibernate extends HibernateDaoSupport implements
|
class DeletedChildDAOHibernate extends HibernateDaoSupport implements
|
||||||
DeletedChildDAO
|
DeletedChildDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
@ -23,7 +23,7 @@ import java.io.Serializable;
|
|||||||
* Represents a deleted child in a layered directory.
|
* Represents a deleted child in a layered directory.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class DeletedChildImpl implements DeletedChild, Serializable
|
class DeletedChildImpl implements DeletedChild, Serializable
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 4997060636280774719L;
|
private static final long serialVersionUID = 4997060636280774719L;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ import java.util.SortedMap;
|
|||||||
* The interface for Directory Nodes.
|
* The interface for Directory Nodes.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface DirectoryNode extends AVMNode
|
interface DirectoryNode extends AVMNode
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Does this directory directly contain the specified node.
|
* Does this directory directly contain the specified node.
|
||||||
|
@ -24,7 +24,7 @@ import java.io.RandomAccessFile;
|
|||||||
* Interface for file content. FileContent can be shared between files.
|
* Interface for file content. FileContent can be shared between files.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface FileContent
|
interface FileContent
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Get the number of files that refer to this content.
|
* Get the number of files that refer to this content.
|
||||||
|
@ -21,7 +21,7 @@ package org.alfresco.repo.avm;
|
|||||||
* DAO for FileContent objects.
|
* DAO for FileContent objects.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface FileContentDAO
|
interface FileContentDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Save one.
|
* Save one.
|
||||||
|
@ -15,17 +15,15 @@
|
|||||||
* License.
|
* License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.alfresco.repo.avm.hibernate;
|
package org.alfresco.repo.avm;
|
||||||
|
|
||||||
import org.alfresco.repo.avm.FileContent;
|
|
||||||
import org.alfresco.repo.avm.FileContentDAO;
|
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author britt
|
* @author britt
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class FileContentDAOHibernate extends HibernateDaoSupport implements
|
class FileContentDAOHibernate extends HibernateDaoSupport implements
|
||||||
FileContentDAO
|
FileContentDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
@ -1,11 +1,23 @@
|
|||||||
/**
|
/*
|
||||||
|
* Copyright (C) 2006 Alfresco, Inc.
|
||||||
*
|
*
|
||||||
|
* Licensed under the Mozilla Public License version 1.1
|
||||||
|
* with a permitted attribution clause. You may obtain a
|
||||||
|
* copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.alfresco.org/legal/license.txt
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||||
|
* either express or implied. See the License for the specific
|
||||||
|
* language governing permissions and limitations under the
|
||||||
|
* License.
|
||||||
*/
|
*/
|
||||||
package org.alfresco.repo.avm.hibernate;
|
package org.alfresco.repo.avm;
|
||||||
|
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
|
||||||
import org.alfresco.repo.avm.RetryingTransactionCallback;
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||||
@ -14,7 +26,7 @@ import org.springframework.orm.hibernate3.HibernateCallback;
|
|||||||
* This is a wrapper around HibernateTxnCallback implementation.
|
* This is a wrapper around HibernateTxnCallback implementation.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class HibernateCallbackWrapper implements HibernateCallback
|
class HibernateCallbackWrapper implements HibernateCallback
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The HibernateTxnCallback to execute.
|
* The HibernateTxnCallback to execute.
|
@ -1,4 +1,4 @@
|
|||||||
package org.alfresco.repo.avm.hibernate;
|
package org.alfresco.repo.avm;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006 Alfresco, Inc.
|
* Copyright (C) 2006 Alfresco, Inc.
|
||||||
@ -19,10 +19,6 @@ package org.alfresco.repo.avm.hibernate;
|
|||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import org.alfresco.repo.avm.AVMException;
|
|
||||||
import org.alfresco.repo.avm.AVMNotFoundException;
|
|
||||||
import org.alfresco.repo.avm.RetryingTransactionCallback;
|
|
||||||
import org.alfresco.repo.avm.RetryingTransaction;
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.dao.DataRetrievalFailureException;
|
import org.springframework.dao.DataRetrievalFailureException;
|
||||||
import org.springframework.dao.DeadlockLoserDataAccessException;
|
import org.springframework.dao.DeadlockLoserDataAccessException;
|
||||||
@ -37,7 +33,7 @@ import org.springframework.transaction.TransactionStatus;
|
|||||||
* Helper for DAOs.
|
* Helper for DAOs.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class HibernateRetryingTransaction extends HibernateTemplate implements RetryingTransaction
|
class HibernateRetryingTransaction extends HibernateTemplate implements RetryingTransaction
|
||||||
{
|
{
|
||||||
private static Logger fgLogger = Logger.getLogger(HibernateRetryingTransaction.class);
|
private static Logger fgLogger = Logger.getLogger(HibernateRetryingTransaction.class);
|
||||||
|
|
||||||
@ -65,7 +61,7 @@ public class HibernateRetryingTransaction extends HibernateTemplate implements R
|
|||||||
* Make one up.
|
* Make one up.
|
||||||
* @param sessionFactory The SessionFactory.
|
* @param sessionFactory The SessionFactory.
|
||||||
*/
|
*/
|
||||||
public HibernateRetryingTransaction()
|
HibernateRetryingTransaction()
|
||||||
{
|
{
|
||||||
fRandom = new Random();
|
fRandom = new Random();
|
||||||
}
|
}
|
||||||
@ -89,6 +85,10 @@ public class HibernateRetryingTransaction extends HibernateTemplate implements R
|
|||||||
}
|
}
|
||||||
catch (Throwable t)
|
catch (Throwable t)
|
||||||
{
|
{
|
||||||
|
if (status == null)
|
||||||
|
{
|
||||||
|
t.printStackTrace(System.err);
|
||||||
|
}
|
||||||
if (!status.isCompleted())
|
if (!status.isCompleted())
|
||||||
{
|
{
|
||||||
fTransactionManager.rollback(status);
|
fTransactionManager.rollback(status);
|
@ -21,7 +21,7 @@ package org.alfresco.repo.avm;
|
|||||||
* Interface for the ancestor-descendent relationship.
|
* Interface for the ancestor-descendent relationship.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface HistoryLink
|
interface HistoryLink
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Set the ancestor part of this.
|
* Set the ancestor part of this.
|
||||||
|
@ -23,7 +23,7 @@ import java.util.List;
|
|||||||
* DAO for history links.
|
* DAO for history links.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface HistoryLinkDAO
|
interface HistoryLinkDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Save and unsaved HistoryLink.
|
* Save and unsaved HistoryLink.
|
||||||
|
@ -15,13 +15,10 @@
|
|||||||
* License.
|
* License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.alfresco.repo.avm.hibernate;
|
package org.alfresco.repo.avm;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.alfresco.repo.avm.AVMNode;
|
|
||||||
import org.alfresco.repo.avm.HistoryLink;
|
|
||||||
import org.alfresco.repo.avm.HistoryLinkDAO;
|
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
|
|
||||||
@ -29,7 +26,7 @@ import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
|||||||
* The Hibernate implementation of the DAO for HistoryLinks.
|
* The Hibernate implementation of the DAO for HistoryLinks.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class HistoryLinkDAOHibernate extends HibernateDaoSupport implements
|
class HistoryLinkDAOHibernate extends HibernateDaoSupport implements
|
||||||
HistoryLinkDAO
|
HistoryLinkDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
@ -21,7 +21,7 @@ package org.alfresco.repo.avm;
|
|||||||
* This is a helper class that knows how to issue identifiers.
|
* This is a helper class that knows how to issue identifiers.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class Issuer
|
class Issuer
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The next number to issue.
|
* The next number to issue.
|
||||||
@ -41,7 +41,7 @@ public class Issuer
|
|||||||
/**
|
/**
|
||||||
* Default constructor.
|
* Default constructor.
|
||||||
*/
|
*/
|
||||||
public Issuer()
|
Issuer()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ public class Issuer
|
|||||||
/**
|
/**
|
||||||
* After the database is up, get our value.
|
* After the database is up, get our value.
|
||||||
*/
|
*/
|
||||||
public void init()
|
void init()
|
||||||
{
|
{
|
||||||
class TxnCallback implements RetryingTransactionCallback
|
class TxnCallback implements RetryingTransactionCallback
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,7 @@ package org.alfresco.repo.avm;
|
|||||||
* DAO for Issuers.
|
* DAO for Issuers.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface IssuerDAO
|
interface IssuerDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Get the Issuer value.
|
* Get the Issuer value.
|
||||||
|
@ -15,18 +15,16 @@
|
|||||||
* License.
|
* License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.alfresco.repo.avm.hibernate;
|
package org.alfresco.repo.avm;
|
||||||
|
|
||||||
|
|
||||||
import org.alfresco.repo.avm.AVMException;
|
|
||||||
import org.alfresco.repo.avm.IssuerDAO;
|
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DAO for Issuers. Hibernate version.
|
* DAO for Issuers. Hibernate version.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class IssuerDAOHibernate extends HibernateDaoSupport implements
|
class IssuerDAOHibernate extends HibernateDaoSupport implements
|
||||||
IssuerDAO
|
IssuerDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
@ -6,7 +6,7 @@ import java.util.List;
|
|||||||
* Interface for Layered Directories.
|
* Interface for Layered Directories.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface LayeredDirectoryNode extends DirectoryNode, Layered
|
interface LayeredDirectoryNode extends DirectoryNode, Layered
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Does this node have a primary indirection.
|
* Does this node have a primary indirection.
|
||||||
|
@ -21,7 +21,7 @@ package org.alfresco.repo.avm;
|
|||||||
* This is the interface for the merged from - to relationship.
|
* This is the interface for the merged from - to relationship.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface MergeLink
|
interface MergeLink
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Set the from part.
|
* Set the from part.
|
||||||
|
@ -23,7 +23,7 @@ import java.util.List;
|
|||||||
* DAO for MergeLinks.
|
* DAO for MergeLinks.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface MergeLinkDAO
|
interface MergeLinkDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Save an unsaved MergeLink.
|
* Save an unsaved MergeLink.
|
||||||
|
@ -15,13 +15,10 @@
|
|||||||
* License.
|
* License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.alfresco.repo.avm.hibernate;
|
package org.alfresco.repo.avm;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.alfresco.repo.avm.AVMNode;
|
|
||||||
import org.alfresco.repo.avm.MergeLink;
|
|
||||||
import org.alfresco.repo.avm.MergeLinkDAO;
|
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
|
|
||||||
@ -29,7 +26,7 @@ import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
|||||||
* The Hibernate implementation of the DAO for a MergeLink
|
* The Hibernate implementation of the DAO for a MergeLink
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class MergeLinkDAOHibernate extends HibernateDaoSupport implements
|
class MergeLinkDAOHibernate extends HibernateDaoSupport implements
|
||||||
MergeLinkDAO
|
MergeLinkDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
@ -21,7 +21,7 @@ package org.alfresco.repo.avm;
|
|||||||
* Eensy-weensy interface for tracking nodes that are new in a store.
|
* Eensy-weensy interface for tracking nodes that are new in a store.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface NewInAVMStore
|
interface NewInAVMStore
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Get the AVMStore part.
|
* Get the AVMStore part.
|
||||||
|
@ -23,7 +23,7 @@ import java.util.List;
|
|||||||
* DAO for NewInAVMStore markers.
|
* DAO for NewInAVMStore markers.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface NewInAVMStoreDAO
|
interface NewInAVMStoreDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Save one.
|
* Save one.
|
||||||
|
@ -15,14 +15,10 @@
|
|||||||
* License.
|
* License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.alfresco.repo.avm.hibernate;
|
package org.alfresco.repo.avm;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.alfresco.repo.avm.AVMNode;
|
|
||||||
import org.alfresco.repo.avm.NewInAVMStore;
|
|
||||||
import org.alfresco.repo.avm.NewInAVMStoreDAO;
|
|
||||||
import org.alfresco.repo.avm.AVMStore;
|
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
|
|
||||||
@ -30,7 +26,7 @@ import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
|||||||
* Hibernate implementation of NewInAVMStore DAO.
|
* Hibernate implementation of NewInAVMStore DAO.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class NewInAVMStoreDAOHibernate extends HibernateDaoSupport implements
|
class NewInAVMStoreDAOHibernate extends HibernateDaoSupport implements
|
||||||
NewInAVMStoreDAO
|
NewInAVMStoreDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
@ -23,7 +23,7 @@ import java.io.Serializable;
|
|||||||
* A record of a node that is new and in which store it resides.
|
* A record of a node that is new and in which store it resides.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class NewInAVMStoreImpl implements NewInAVMStore, Serializable
|
class NewInAVMStoreImpl implements NewInAVMStore, Serializable
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1905996612150732182L;
|
private static final long serialVersionUID = 1905996612150732182L;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ import org.apache.commons.logging.LogFactory;
|
|||||||
* in the AVM repository. These orphans arise from purge operations.
|
* in the AVM repository. These orphans arise from purge operations.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class OrphanReaper implements Runnable
|
class OrphanReaper implements Runnable
|
||||||
{
|
{
|
||||||
private Log fgLogger = LogFactory.getLog(OrphanReaper.class);
|
private Log fgLogger = LogFactory.getLog(OrphanReaper.class);
|
||||||
/**
|
/**
|
||||||
@ -69,7 +69,7 @@ public class OrphanReaper implements Runnable
|
|||||||
/**
|
/**
|
||||||
* Create one with default parameters.
|
* Create one with default parameters.
|
||||||
*/
|
*/
|
||||||
public OrphanReaper()
|
OrphanReaper()
|
||||||
{
|
{
|
||||||
fInactiveBaseSleep = 30000;
|
fInactiveBaseSleep = 30000;
|
||||||
fActiveBaseSleep = 1000;
|
fActiveBaseSleep = 1000;
|
||||||
@ -119,7 +119,7 @@ public class OrphanReaper implements Runnable
|
|||||||
/**
|
/**
|
||||||
* Start things up after configuration is complete.
|
* Start things up after configuration is complete.
|
||||||
*/
|
*/
|
||||||
public void init()
|
void init()
|
||||||
{
|
{
|
||||||
fThread = new Thread(this);
|
fThread = new Thread(this);
|
||||||
fThread.start();
|
fThread.start();
|
||||||
@ -129,7 +129,7 @@ public class OrphanReaper implements Runnable
|
|||||||
* Shutdown the reaper. This needs to be called when
|
* Shutdown the reaper. This needs to be called when
|
||||||
* the application shuts down.
|
* the application shuts down.
|
||||||
*/
|
*/
|
||||||
public void shutDown()
|
void shutDown()
|
||||||
{
|
{
|
||||||
fDone = true;
|
fDone = true;
|
||||||
try
|
try
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
package org.alfresco.repo.avm;
|
package org.alfresco.repo.avm;
|
||||||
|
|
||||||
|
/**
|
||||||
public interface RetryingTransaction
|
* Interface for a retrying transaction. All operations, so far,
|
||||||
|
* in the AVM repository are idempotent and can thus be retried
|
||||||
|
* when a transaction fails for synchronization reasons.
|
||||||
|
* @author britt
|
||||||
|
*/
|
||||||
|
interface RetryingTransaction
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform a set of operations under a single transaction.
|
* Perform a set of operations under a single transaction.
|
||||||
* Keep trying if the operation fails because of a concurrency issue.
|
* Keep trying if the operation fails because of a concurrency issue.
|
||||||
|
@ -21,7 +21,7 @@ package org.alfresco.repo.avm;
|
|||||||
* Worker object for AVM Retrying Transactions.
|
* Worker object for AVM Retrying Transactions.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface RetryingTransactionCallback
|
interface RetryingTransactionCallback
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Do our work.
|
* Do our work.
|
||||||
|
@ -20,7 +20,7 @@ package org.alfresco.repo.avm;
|
|||||||
* Represents a single version root.
|
* Represents a single version root.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface VersionRoot
|
interface VersionRoot
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @return the createDate
|
* @return the createDate
|
||||||
|
@ -24,7 +24,7 @@ import java.util.List;
|
|||||||
* DAO for VersionRoot objects.
|
* DAO for VersionRoot objects.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public interface VersionRootDAO
|
interface VersionRootDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Save an unsaved VersionRoot.
|
* Save an unsaved VersionRoot.
|
||||||
|
@ -15,14 +15,11 @@
|
|||||||
* License.
|
* License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.alfresco.repo.avm.hibernate;
|
package org.alfresco.repo.avm;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.alfresco.repo.avm.AVMStore;
|
|
||||||
import org.alfresco.repo.avm.VersionRoot;
|
|
||||||
import org.alfresco.repo.avm.VersionRootDAO;
|
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
|
|
||||||
@ -30,7 +27,7 @@ import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
|||||||
* This is the Hibernate version of the DAO for version roots.
|
* This is the Hibernate version of the DAO for version roots.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class VersionRootDAOHibernate extends HibernateDaoSupport implements
|
class VersionRootDAOHibernate extends HibernateDaoSupport implements
|
||||||
VersionRootDAO
|
VersionRootDAO
|
||||||
{
|
{
|
||||||
/**
|
/**
|
@ -24,7 +24,7 @@ import java.io.Serializable;
|
|||||||
* Hold a single version root.
|
* Hold a single version root.
|
||||||
* @author britt
|
* @author britt
|
||||||
*/
|
*/
|
||||||
public class VersionRootImpl implements VersionRoot, Serializable
|
class VersionRootImpl implements VersionRoot, Serializable
|
||||||
{
|
{
|
||||||
static final long serialVersionUID = 8826954538210455917L;
|
static final long serialVersionUID = 8826954538210455917L;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user