mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Big honkin' merge from head. Sheesh!
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3617 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1134,7 +1134,6 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
|
||||
* @see QName
|
||||
* @see org.alfresco.service.namespace.RegexQNamePattern#MATCH_ALL
|
||||
*/
|
||||
@Auditable(key = Auditable.Key.ARG_0 ,parameters = {"nodeRef", "typeQNamePattern", "qnamePattern"})
|
||||
public List<ChildAssociationRef> getChildAssocs(
|
||||
NodeRef nodeRef,
|
||||
QNamePattern typeQNamePattern,
|
||||
@@ -1158,6 +1157,32 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a child NodeRef by name.
|
||||
* @param nodeRef The parent node.
|
||||
* @param assocTypeQName The type of the Child Association.
|
||||
* @param childName The name of the child to get.
|
||||
*/
|
||||
public NodeRef getChildByName(NodeRef nodeRef, QName assocTypeQName, String childName)
|
||||
{
|
||||
if (!assocTypeQName.equals(ContentModel.ASSOC_CONTAINS))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
Object [] avmVersionPath = AVMNodeConverter.ToAVMVersionPath(nodeRef);
|
||||
try
|
||||
{
|
||||
AVMNodeDescriptor child = fAVMService.lookup((Integer)avmVersionPath[0],
|
||||
(String)avmVersionPath[1]);
|
||||
return AVMNodeConverter.ToNodeRef((Integer)avmVersionPath[0],
|
||||
child.getPath());
|
||||
}
|
||||
catch (AVMException e)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the primary parent-child relationship.
|
||||
* <p>
|
||||
|
@@ -38,17 +38,17 @@ public class AVMServiceTestBase extends TestCase
|
||||
/**
|
||||
* The AVMService we are testing.
|
||||
*/
|
||||
protected AVMService fService;
|
||||
protected static AVMService fService;
|
||||
|
||||
/**
|
||||
* The reaper thread.
|
||||
*/
|
||||
protected OrphanReaper fReaper;
|
||||
protected static OrphanReaper fReaper;
|
||||
|
||||
/**
|
||||
* The application context.
|
||||
*/
|
||||
protected FileSystemXmlApplicationContext fContext;
|
||||
protected static FileSystemXmlApplicationContext fContext;
|
||||
|
||||
/**
|
||||
* The start time of actual work for a test.
|
||||
@@ -63,9 +63,12 @@ public class AVMServiceTestBase extends TestCase
|
||||
@Override
|
||||
protected void setUp() throws Exception
|
||||
{
|
||||
fContext = new FileSystemXmlApplicationContext("config/alfresco/avm-test-context.xml");
|
||||
fService = (AVMService)fContext.getBean("AVMService");
|
||||
fReaper = (OrphanReaper)fContext.getBean("orphanReaper");
|
||||
if (fContext == null)
|
||||
{
|
||||
fContext = new FileSystemXmlApplicationContext("config/alfresco/avm-test-context.xml");
|
||||
fService = (AVMService)fContext.getBean("AVMService");
|
||||
fReaper = (OrphanReaper)fContext.getBean("orphanReaper");
|
||||
}
|
||||
fStartTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
@@ -83,10 +86,11 @@ public class AVMServiceTestBase extends TestCase
|
||||
{
|
||||
fService.purgeAVMStore(desc.getName());
|
||||
}
|
||||
fContext.close();
|
||||
File alfData = new File("alf_data");
|
||||
File target = new File("alf_data" + now);
|
||||
alfData.renameTo(target);
|
||||
fService.createAVMStore("main");
|
||||
// fContext.close();
|
||||
// File alfData = new File("alf_data");
|
||||
// File target = new File("alf_data" + now);
|
||||
// alfData.renameTo(target);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -78,7 +78,7 @@
|
||||
<subclass discriminator-value="plainfile"
|
||||
name="PlainFileNodeImpl" proxy="PlainFileNode" lazy="true">
|
||||
<property name="contentURL" column="content_url" type="string" length="128"/>
|
||||
<property name="mimeType" column="mime_type" type="string" length="32"/>
|
||||
<property name="mimeType" column="mime_type" type="string" length="64"/>
|
||||
<property name="encoding" column="encoding" type="string" length="16"/>
|
||||
<property name="length" column="length" type="long"/>
|
||||
</subclass>
|
||||
|
Reference in New Issue
Block a user