Content URLs are now generated with an extra HOUR folder to handle high volume input in one day better

Added cleanup job for content stores
 - content is moved into (alf_data)/contentstore.deleted and mirrors the live content store
 - We'll make a call about disabling the trigger for the job, but currently it will fire at 4am


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2422 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-02-16 20:01:57 +00:00
parent 530b2b9026
commit 440fa299b4
15 changed files with 621 additions and 252 deletions

View File

@@ -24,12 +24,14 @@ import java.util.Map;
import javax.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.domain.NodeStatus;
import org.alfresco.repo.node.BaseNodeServiceTest;
import org.alfresco.repo.transaction.AlfrescoTransactionSupport;
import org.alfresco.repo.transaction.TransactionUtil;
import org.alfresco.repo.transaction.TransactionUtil.TransactionWork;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.ContentData;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.QName;
@@ -257,4 +259,22 @@ public class DbNodeServiceImplTest extends BaseNodeServiceTest
throw e;
}
}
/**
* Checks that the string_value retrieval against a property type is working
*/
public void testGetContentDataStringValues() throws Exception
{
ContentData contentData = new ContentData("abc", MimetypeMap.MIMETYPE_TEXT_PLAIN, 0L, null);
// put this in as a random property
nodeService.setProperty(
rootNodeRef,
QName.createQName(NAMESPACE, "random"),
contentData);
// get a list of all content values
List<String> contentDataStrings = nodeDaoService.getContentDataStrings();
assertNotNull(contentDataStrings);
assertTrue("ContentData not represented as a String in results",
contentDataStrings.contains(contentData.toString()));
}
}

View File

@@ -176,4 +176,12 @@ public interface NodeDaoService
* returns <code>null</code>.
*/
public NodeStatus getNodeStatus(String protocol, String identifier, String id);
/**
* Fetch all content data strings. These are all string values that begin
* with <b>contentUrl=</b>.
*
* @return Returns the string values for content data
*/
public List<String> getContentDataStrings();
}

View File

@@ -54,11 +54,11 @@ import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
*/
public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements NodeDaoService
{
public static final String QUERY_GET_ALL_STORES = "store.GetAllStores";
public static final String QUERY_GET_CHILD_ASSOC = "node.GetChildAssoc";
public static final String QUERY_GET_NODE_ASSOC = "node.GetNodeAssoc";
public static final String QUERY_GET_NODE_ASSOC_TARGETS = "node.GetNodeAssocTargets";
public static final String QUERY_GET_NODE_ASSOC_SOURCES = "node.GetNodeAssocSources";
private static final String QUERY_GET_ALL_STORES = "store.GetAllStores";
private static final String QUERY_GET_NODE_ASSOC = "node.GetNodeAssoc";
private static final String QUERY_GET_NODE_ASSOC_TARGETS = "node.GetNodeAssocTargets";
private static final String QUERY_GET_NODE_ASSOC_SOURCES = "node.GetNodeAssocSources";
private static final String QUERY_GET_CONTENT_DATA_STRINGS = "node.GetContentDataStrings";
/** a uuid identifying this unique instance */
private String uuid;
@@ -504,4 +504,39 @@ public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements
// remove instance
getHibernateTemplate().delete(assoc);
}
@SuppressWarnings("unchecked")
public List<String> getContentDataStrings()
{
HibernateCallback callback = new HibernateCallback()
{
public Object doInHibernate(Session session)
{
Query query = session.getNamedQuery(HibernateNodeDaoServiceImpl.QUERY_GET_CONTENT_DATA_STRINGS);
return query.list();
}
};
List<String> queryResults = (List) getHibernateTemplate().execute(callback);
return queryResults;
}
}