Build fix for failing TCK tests

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@55921 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2013-09-24 20:45:29 +00:00
parent 998621d807
commit b891428c34
2 changed files with 12 additions and 8 deletions

View File

@@ -817,7 +817,7 @@ public class AlfrescoCmisServiceImpl extends AbstractCmisService implements Alfr
{
CMISNodeInfo folderInfo = getOrCreateFolderInfo(folderId, "Folder");
params.setQuery("+=cm:workingCopyOwner:\""+AuthenticationUtil.getFullyAuthenticatedUser()+"\" +=PARENT:\""+folderInfo.getNodeRef().toString()+"\"");
params.setQuery("+=cm:workingCopyOwner:\""+AuthenticationUtil.getFullyAuthenticatedUser()+"\" AND +=PARENT:\""+folderInfo.getNodeRef().toString()+"\"");
params.addStore(folderInfo.getNodeRef().getStoreRef());
}

View File

@@ -536,28 +536,32 @@ public class DBQuery extends BaseQuery implements DBQueryBuilderComponent
String fieldName = qnameString;
// Check for any prefixes and expand to the full uri
if (qnameString.charAt(0) != '{')
if(fieldName.startsWith("@"))
{
int colonPosition = qnameString.indexOf(':');
fieldName = fieldName.substring(1);
}
// Check for any prefixes and expand to the full uri
if (fieldName.charAt(0) != '{')
{
int colonPosition = fieldName.indexOf(':');
if (colonPosition == -1)
{
// use the default namespace
fieldName = "{" + NamespaceService.CONTENT_MODEL_1_0_URI + "}" + qnameString;
fieldName = "{" + NamespaceService.CONTENT_MODEL_1_0_URI + "}" + fieldName;
}
else
{
String prefix = qnameString.substring(0, colonPosition);
String prefix = fieldName.substring(0, colonPosition);
String uri = matchURI(prefix, namespacePrefixResolver);
if (uri == null)
{
fieldName = "{" + NamespaceService.CONTENT_MODEL_1_0_URI + "}" + qnameString;
fieldName = "{" + NamespaceService.CONTENT_MODEL_1_0_URI + "}" + fieldName;
}
else
{
fieldName = "{" + uri + "}" + qnameString.substring(colonPosition + 1);
fieldName = "{" + uri + "}" + fieldName.substring(colonPosition + 1);
}
}