mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged V3.3-BUG-FIX to HEAD
21536: Fix for ALF-4068 - IE6 XSS issue 21538: Added missing I18N label for when no wiki page defined in dashlet POST component 21562: Merged BRANCHES/DEV/BELARUS/V3.3-BUG-FIX-2010_06_14 to BRANCHES/DEV/V3.3-BUG-FIX: 20742: ALF-3572: Treat PasswordText as default for CMIS Web Service authentication 21575: Merged BRANCHES/DEV/BELARUS/V3.3-BUG-FIX-2010_06_24 to BRANCHES/DEV/V3.3-BUG-FIX: 21098: Bug is related to unsupported CMISResultSetMetaDataImpl.getLimitBy() method. But LimitBy parameter is required for a lot of search logic parts including permissions and constraints checks. To support LimitBy parameter the following solution was implemented: 21578: Dictionary DAO: wrap initDictionary in writeLock - investigating intermittent failure of RepoAdminServiceImplTest.testSimpleDynamicModelViaNodeService (eg. b29/b59 of V3.3-BUG-FIX) 21593: Fix ALF-1703: properties of type 'propertyXML' are returned as 'propertyString' 21594: Fix ALF-4202: Cannot issue query with join via Web Services binding - wasn't issuing query with CMISQueryMode.CMS_WITH_ALFRESCO_EXTENSIONS query mode 21611: Fix ALF-2649: CMIS query join return partial entry result 21627: Merged V3.3 to V3.3-BUG-FIX 21532: Fix for ALF-3042: Missing Null check for the propertyDefinition. - fixed all unprotected uses within indexing and query 21534: Fix for ALF-2151: Range queries don't work. - docs updated - added unit test to check for failure of d:content ranges as expected 21558: Fix for ALF-4183 - Publishing a draft blog post does not turn on permission inheritence 21609: Fix NFS problems with gEdit and OpenOffice when editing documents in the root of the filesystem. ALF-3955. Also fixed an unreported issue where an InvalidNodeRefException is thrown by the file cache timer after several edit/save operations on a file. 21626: Merged PATCHES/V3.2.1 to V3.3 21606: ALF-4044: Introduced new policy.content.update.ignoreEmpty setting, that when true causes the repository to behave as it did before the fix to ALF-254. I.e. writing empty content will not trigger onContentPropertyUpdate policies or inbound content rules. This enables better compatibility with mac clients using CIFS or WebDAV; they actually create and close a file before appending its data. 21607: (RECORD ONLY) Incremented version label git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21628 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -99,6 +99,9 @@
|
||||
<property name="eagerContentStoreCleaner" >
|
||||
<ref bean="eagerContentStoreCleaner" />
|
||||
</property>
|
||||
<property name="ignoreEmptyContent" >
|
||||
<value>${policy.content.update.ignoreEmpty}</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="contentService" parent="baseContentService">
|
||||
|
@@ -377,6 +377,11 @@ repo.remote.endpoint=/service
|
||||
# Create home folders as people are created (true) or create them lazily (false)
|
||||
home.folder.creation.eager=true
|
||||
|
||||
# Should we consider zero byte content to be the same as no content when firing
|
||||
# content update policies? Prevents 'premature' firing of inbound content rules
|
||||
# for some clients such as Mac OS X Finder
|
||||
policy.content.update.ignoreEmpty=false
|
||||
|
||||
# The well known RMI registry port is defined in the alfresco-shared.properties file
|
||||
# host will need to be changed from localhost to make the services available to other
|
||||
# computers.
|
||||
|
@@ -36,6 +36,7 @@ import org.alfresco.repo.search.impl.querymodel.QueryEngine;
|
||||
import org.alfresco.repo.search.impl.querymodel.QueryEngineResults;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.search.LimitBy;
|
||||
import org.alfresco.service.cmr.search.ResultSet;
|
||||
|
||||
/**
|
||||
@@ -135,7 +136,12 @@ public class CMISQueryServiceImpl implements CMISQueryService
|
||||
wrapped.put(selector, current);
|
||||
}
|
||||
}
|
||||
CMISResultSet cmis = new CMISResultSetImpl(wrapped, options, nodeService, query, cmisDictionaryService, alfrescoDictionaryService);
|
||||
LimitBy limitBy = null;
|
||||
if ((null != results.getResults()) && !results.getResults().isEmpty() && (null != results.getResults().values()) && !results.getResults().values().isEmpty())
|
||||
{
|
||||
limitBy = results.getResults().values().iterator().next().getResultSetMetaData().getLimitedBy();
|
||||
}
|
||||
CMISResultSet cmis = new CMISResultSetImpl(wrapped, options, limitBy, nodeService, query, cmisDictionaryService, alfrescoDictionaryService);
|
||||
return cmis;
|
||||
}
|
||||
|
||||
|
@@ -37,6 +37,7 @@ import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.search.LimitBy;
|
||||
import org.alfresco.service.cmr.search.ResultSet;
|
||||
import org.alfresco.service.cmr.search.ResultSetRow;
|
||||
|
||||
@@ -49,6 +50,8 @@ public class CMISResultSetImpl implements CMISResultSet, Serializable
|
||||
|
||||
private Map<String, ResultSet> wrapped;
|
||||
|
||||
private LimitBy limitBy;
|
||||
|
||||
CMISQueryOptions options;
|
||||
|
||||
NodeService nodeService;
|
||||
@@ -59,11 +62,12 @@ public class CMISResultSetImpl implements CMISResultSet, Serializable
|
||||
|
||||
DictionaryService alfrescoDictionaryService;
|
||||
|
||||
public CMISResultSetImpl(Map<String, ResultSet> wrapped, CMISQueryOptions options, NodeService nodeService, Query query, CMISDictionaryService cmisDictionaryService,
|
||||
DictionaryService alfrescoDictionaryService)
|
||||
public CMISResultSetImpl(Map<String, ResultSet> wrapped, CMISQueryOptions options, LimitBy limitBy, NodeService nodeService, Query query,
|
||||
CMISDictionaryService cmisDictionaryService, DictionaryService alfrescoDictionaryService)
|
||||
{
|
||||
this.wrapped = wrapped;
|
||||
this.options = options;
|
||||
this.limitBy = limitBy;
|
||||
this.nodeService = nodeService;
|
||||
this.query = query;
|
||||
this.cmisDictionaryService = cmisDictionaryService;
|
||||
@@ -94,7 +98,7 @@ public class CMISResultSetImpl implements CMISResultSet, Serializable
|
||||
*/
|
||||
public CMISResultSetMetaData getMetaData()
|
||||
{
|
||||
return new CMISResultSetMetaDataImpl(options, query, cmisDictionaryService, alfrescoDictionaryService);
|
||||
return new CMISResultSetMetaDataImpl(options, query, limitBy, cmisDictionaryService, alfrescoDictionaryService);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -49,16 +49,18 @@ public class CMISResultSetMetaDataImpl implements CMISResultSetMetaData
|
||||
{
|
||||
private CMISQueryOptions options;
|
||||
private SearchParameters searchParams;
|
||||
private LimitBy limitBy;
|
||||
|
||||
private Map<String, CMISResultSetColumn> columnMetaData;
|
||||
|
||||
private Map<String, CMISResultSetSelector> selectorMetaData;
|
||||
|
||||
public CMISResultSetMetaDataImpl(CMISQueryOptions options, Query query, CMISDictionaryService cmisDictionaryService, DictionaryService alfrescoDictionaryService)
|
||||
public CMISResultSetMetaDataImpl(CMISQueryOptions options, Query query, LimitBy limitBy, CMISDictionaryService cmisDictionaryService,
|
||||
DictionaryService alfrescoDictionaryService)
|
||||
{
|
||||
this.options = options;
|
||||
this.searchParams = new SearchParameters(options);
|
||||
|
||||
this.limitBy = limitBy;
|
||||
Map<String, Selector> selectors = query.getSource().getSelectors();
|
||||
selectorMetaData = new LinkedHashMap<String, CMISResultSetSelector>();
|
||||
for(Selector selector : selectors.values())
|
||||
@@ -177,7 +179,7 @@ public class CMISResultSetMetaDataImpl implements CMISResultSetMetaData
|
||||
|
||||
public LimitBy getLimitedBy()
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
return limitBy;
|
||||
}
|
||||
|
||||
public PermissionEvaluationMode getPermissionEvaluationMode()
|
||||
|
@@ -96,6 +96,8 @@ public class ContentServiceImpl implements ContentService, ApplicationContextAwa
|
||||
/** the store for all temporarily created content */
|
||||
private ContentStore tempStore;
|
||||
private ContentTransformer imageMagickContentTransformer;
|
||||
/** Should we consider zero byte content to be the same as no content? */
|
||||
private boolean ignoreEmptyContent;
|
||||
|
||||
/**
|
||||
* The policy component
|
||||
@@ -154,6 +156,10 @@ public class ContentServiceImpl implements ContentService, ApplicationContextAwa
|
||||
this.imageMagickContentTransformer = imageMagickContentTransformer;
|
||||
}
|
||||
|
||||
public void setIgnoreEmptyContent(boolean ignoreEmptyContent)
|
||||
{
|
||||
this.ignoreEmptyContent = ignoreEmptyContent;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
|
||||
@@ -232,8 +238,10 @@ public class ContentServiceImpl implements ContentService, ApplicationContextAwa
|
||||
{
|
||||
ContentData beforeValue = (ContentData) before.get(propertyQName);
|
||||
ContentData afterValue = (ContentData) after.get(propertyQName);
|
||||
boolean hasContentBefore = ContentData.hasContent(beforeValue);
|
||||
boolean hasContentAfter = ContentData.hasContent(afterValue);
|
||||
boolean hasContentBefore = ContentData.hasContent(beforeValue)
|
||||
&& (!ignoreEmptyContent || beforeValue.getSize() > 0);
|
||||
boolean hasContentAfter = ContentData.hasContent(afterValue)
|
||||
&& (!ignoreEmptyContent || afterValue.getSize() > 0);
|
||||
|
||||
// There are some shortcuts here
|
||||
if (!hasContentBefore && !hasContentAfter)
|
||||
|
@@ -1443,6 +1443,10 @@ public class ADMLuceneIndexerImpl extends AbstractLuceneIndexerImpl<NodeRef> imp
|
||||
|
||||
private boolean isCategorised(AspectDefinition aspDef)
|
||||
{
|
||||
if(aspDef == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AspectDefinition current = aspDef;
|
||||
while (current != null)
|
||||
{
|
||||
|
@@ -316,7 +316,6 @@ public class ADMLuceneSearcherImpl extends AbstractLuceneBase implements LuceneS
|
||||
field = expandAttributeFieldName(field);
|
||||
PropertyDefinition propertyDef = getDictionaryService().getProperty(QName.createQName(field.substring(1)));
|
||||
|
||||
// Handle .size and .mimetype
|
||||
if(propertyDef == null)
|
||||
{
|
||||
if(field.endsWith(".size"))
|
||||
|
@@ -1099,8 +1099,35 @@ public class ADMLuceneTest extends TestCase implements DictionaryListener
|
||||
// ftsQueryWithCount(searcher, "TEXT:(brown *(5) dog)", 1);
|
||||
// ftsQueryWithCount(searcher, "TEXT:(brown *(6) dog)", 1);
|
||||
//
|
||||
// // ftsQueryWithCount(searcher, "brown..dog", 1); // is this allowed??
|
||||
// // ftsQueryWithCount(searcher, "cm:content:brown..dog", 1);
|
||||
// try
|
||||
// {
|
||||
// ftsQueryWithCount(searcher, "brown..dog", 1); // is this allowed??
|
||||
// fail("Range query should not be supported against type d:content");
|
||||
// }
|
||||
// catch(UnsupportedOperationException e)
|
||||
// {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// ftsQueryWithCount(searcher, "TEXT:brown..dog", 1);
|
||||
// fail("Range query should not be supported against type d:content");
|
||||
// }
|
||||
// catch(UnsupportedOperationException e)
|
||||
// {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// ftsQueryWithCount(searcher, "cm:content:brown..dog", 1);
|
||||
// fail("Range query should not be supported against type d:content");
|
||||
// }
|
||||
// catch(UnsupportedOperationException e)
|
||||
// {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// QName qname = QName.createQName(TEST_NAMESPACE, "float\\-ista");
|
||||
// ftsQueryWithCount(searcher, qname + ":3.40", 1);
|
||||
@@ -3068,6 +3095,25 @@ public class ADMLuceneTest extends TestCase implements DictionaryListener
|
||||
results = searcher.query(spN);
|
||||
results.close();
|
||||
|
||||
// test sort on unkown properties ALF-4193
|
||||
|
||||
spN = new SearchParameters();
|
||||
spN.addStore(rootNodeRef.getStoreRef());
|
||||
spN.setLanguage(SearchService.LANGUAGE_LUCENE);
|
||||
spN.setQuery("PATH:\"//.\"");
|
||||
spN.addSort("PARENT", false);
|
||||
results = searcher.query(spN);
|
||||
results.close();
|
||||
|
||||
spN = new SearchParameters();
|
||||
spN.addStore(rootNodeRef.getStoreRef());
|
||||
spN.setLanguage(SearchService.LANGUAGE_LUCENE);
|
||||
spN.setQuery("PATH:\"//.\"");
|
||||
spN.addSort("@PARENT:PARENT", false);
|
||||
results = searcher.query(spN);
|
||||
results.close();
|
||||
|
||||
|
||||
luceneFTS.resume();
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user