Merged V2.1 to HEAD

6515: Fix for AWC-1362 (system error page when clicking on space that doesn't exist in navigator)
   6516: Fix for AR-1688 - Vista
   6518: Fix for AWC-1479, AWC-1199 and AWC-426 (javascript insertion into forum posts security related fixes) limit to subset of safe tags for posting
   6519: Fix AR-1690 Web Scripts url.args is missing even though it's documented in WIKI
   6520: Fix for AWC-1271 (component generator config ignored for associations)
   6521: Fix AWC-1492 Some included javascript files in template/webscripts use the wrong app context path i.e. /alfresco when the app is called /alfzip
   6522: Build fix
   6523: - Fix rendering of tasks with no description in office portlets
   6524: Added thread pool for index merging (AR-1633, AR-1579)
   6525: One more fix for rendering of tasks with no description in office portlets
   6527: Renamed axis jar to reflect version number.
   6528: WebServices query cache refactoring


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6741 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-09-10 23:44:07 +00:00
parent d0e64d06b4
commit e02f50bd08
13 changed files with 460 additions and 391 deletions

View File

@@ -740,6 +740,9 @@ public final class SMBErrorText
case SMBStatus.NTPipeBusy:
errtext = "Pipe is busy";
break;
case SMBStatus.NTInvalidLevel:
errtext = "Invalid information level";
break;
default:
errtext = "Unknown NT status 0x" + Integer.toHexString(errcode);
break;

View File

@@ -252,6 +252,7 @@ public final class SMBStatus
public static final int NTNoSuchDomain = 0xC00000DF;
public static final int NTTooManyOpenFiles = 0xC000011F;
public static final int NTCancelled = 0xC0000120;
public static final int NTInvalidLevel = 0xC0000148;
public static final int NTFileOffline = 0xC0000267;
public static final int Win32FileNotFound = 2;

View File

@@ -3477,7 +3477,7 @@ public class NTProtocolHandler extends CoreProtocolHandler
// Requested information level is not supported
m_sess.sendErrorResponseSMB(SMBStatus.SRVNotSupported, SMBStatus.ErrSrv);
m_sess.sendErrorResponseSMB(SMBStatus.NTInvalidLevel, SMBStatus.SRVNotSupported, SMBStatus.ErrSrv);
}
}
@@ -3723,7 +3723,7 @@ public class NTProtocolHandler extends CoreProtocolHandler
// Requested information level is not supported
m_sess.sendErrorResponseSMB(SMBStatus.SRVNotSupported, SMBStatus.ErrSrv);
m_sess.sendErrorResponseSMB(SMBStatus.NTInvalidLevel, SMBStatus.SRVNotSupported, SMBStatus.ErrSrv);
}
}
@@ -4197,7 +4197,7 @@ public class NTProtocolHandler extends CoreProtocolHandler
// Requested information level is not supported
m_sess.sendErrorResponseSMB(SMBStatus.NTInvalidParameter, SMBStatus.SRVNonSpecificError, SMBStatus.ErrSrv);
m_sess.sendErrorResponseSMB(SMBStatus.NTInvalidLevel, SMBStatus.SRVNonSpecificError, SMBStatus.ErrSrv);
return;
}
}
@@ -4412,7 +4412,7 @@ public class NTProtocolHandler extends CoreProtocolHandler
// Requested information level is not supported
m_sess.sendErrorResponseSMB(SMBStatus.NTInvalidParameter, SMBStatus.SRVNonSpecificError, SMBStatus.ErrSrv);
m_sess.sendErrorResponseSMB(SMBStatus.NTInvalidLevel, SMBStatus.SRVNonSpecificError, SMBStatus.ErrSrv);
return;
}
}

View File

@@ -150,6 +150,7 @@ public abstract class BaseNodeServiceTest extends BaseSpringTest
protected NodeService nodeService;
/** populated during setup */
protected NodeRef rootNodeRef;
private NodeRef cat;
@Override
protected void onSetUpInTransaction() throws Exception
@@ -187,6 +188,13 @@ public abstract class BaseNodeServiceTest extends BaseSpringTest
"Test_" + System.currentTimeMillis());
rootNodeRef = nodeService.getRootNode(storeRef);
StoreRef catStoreRef = nodeService.createStore(
StoreRef.PROTOCOL_WORKSPACE,
"Test_cat_" + System.currentTimeMillis());
NodeRef catRootNodeRef = nodeService.getRootNode(catStoreRef);
cat = nodeService.createNode(catRootNodeRef, ContentModel.ASSOC_CHILDREN, QName.createQName("{namespace}cat"), ContentModel.TYPE_CATEGORY).getChildRef();
// downgrade integrity checks
IntegrityChecker.setWarnInTransaction();
}
@@ -1142,7 +1150,7 @@ public abstract class BaseNodeServiceTest extends BaseSpringTest
properties.put(PROP_QNAME_QNAME_VALUE, TYPE_QNAME_TEST_CONTENT);
properties.put(PROP_QNAME_PATH_VALUE, pathProperty);
properties.put(PROP_QNAME_CONTENT_VALUE, new ContentData("url", "text/plain", 88L, "UTF-8"));
properties.put(PROP_QNAME_CATEGORY_VALUE, rootNodeRef);
properties.put(PROP_QNAME_CATEGORY_VALUE, cat);
properties.put(PROP_QNAME_LOCALE_VALUE, Locale.CHINESE);
properties.put(PROP_QNAME_NULL_VALUE, null);
properties.put(PROP_QNAME_MULTI_VALUE, listProperty);
@@ -1180,7 +1188,7 @@ public abstract class BaseNodeServiceTest extends BaseSpringTest
properties.put(PROP_QNAME_QNAME_VALUE, TYPE_QNAME_TEST_CONTENT);
properties.put(PROP_QNAME_PATH_VALUE, pathProperty);
properties.put(PROP_QNAME_CONTENT_VALUE, new ContentData("url", "text/plain", 88L, "UTF-8"));
properties.put(PROP_QNAME_CATEGORY_VALUE, rootNodeRef);
properties.put(PROP_QNAME_CATEGORY_VALUE, cat);
properties.put(PROP_QNAME_LOCALE_VALUE, Locale.CHINESE);
properties.put(PROP_QNAME_NULL_VALUE, null);
properties.put(PROP_QNAME_MULTI_VALUE, listProperty);

View File

@@ -29,6 +29,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ThreadPoolExecutor;
import javax.transaction.RollbackException;
import javax.transaction.SystemException;
@@ -128,6 +129,8 @@ public abstract class AbstractLuceneIndexerAndSearcherFactory implements LuceneI
private MLAnalysisMode defaultMLSearchAnalysisMode = MLAnalysisMode.EXACT_LANGUAGE_AND_ALL;
private ThreadPoolExecutor threadPoolExecutor;
/**
* Private constructor for the singleton TODO: FIt in with IOC
*/
@@ -137,11 +140,11 @@ public abstract class AbstractLuceneIndexerAndSearcherFactory implements LuceneI
super();
}
/**
* Set the directory that contains the indexes
*
* @param indexRootLocation
*/
/**
* Set the directory that contains the indexes
*
* @param indexRootLocation
*/
public void setIndexRootLocation(String indexRootLocation)
{
@@ -838,6 +841,7 @@ public abstract class AbstractLuceneIndexerAndSearcherFactory implements LuceneI
/**
* Set the lucene write lock timeout
*
* @param timeout
*/
public void setWriteLockTimeout(long timeout)
@@ -847,6 +851,7 @@ public abstract class AbstractLuceneIndexerAndSearcherFactory implements LuceneI
/**
* Set the lucene commit lock timeout (no longer used with lucene 2.1)
*
* @param timeout
*/
public void setCommitLockTimeout(long timeout)
@@ -856,6 +861,7 @@ public abstract class AbstractLuceneIndexerAndSearcherFactory implements LuceneI
/**
* Get the commit lock timout.
*
* @return - the timeout
*/
public long getCommitLockTimeout()
@@ -864,7 +870,8 @@ public abstract class AbstractLuceneIndexerAndSearcherFactory implements LuceneI
}
/**
* Get the write lock timeout
* Get the write lock timeout
*
* @return - the timeout in ms
*/
public long getWriteLockTimeout()
@@ -884,6 +891,7 @@ public abstract class AbstractLuceneIndexerAndSearcherFactory implements LuceneI
/**
* Get the max number of tokens in the field
*
* @return - the max tokens considered.
*/
public int getIndexerMaxFieldLength()
@@ -893,6 +901,7 @@ public abstract class AbstractLuceneIndexerAndSearcherFactory implements LuceneI
/**
* Set the max field length.
*
* @param indexerMaxFieldLength
*/
public void setIndexerMaxFieldLength(int indexerMaxFieldLength)
@@ -900,6 +909,16 @@ public abstract class AbstractLuceneIndexerAndSearcherFactory implements LuceneI
this.indexerMaxFieldLength = indexerMaxFieldLength;
}
public ThreadPoolExecutor getThreadPoolExecutor()
{
return this.threadPoolExecutor;
}
public void setThreadPoolExecutor(ThreadPoolExecutor threadPoolExecutor)
{
this.threadPoolExecutor = threadPoolExecutor;
}
/**
* This component is able to <i>safely</i> perform backups of the Lucene indexes while the server is running.
* <p>
@@ -922,7 +941,6 @@ public abstract class AbstractLuceneIndexerAndSearcherFactory implements LuceneI
/**
* Default constructor
*
*/
public LuceneIndexBackupComponent()
{
@@ -1082,8 +1100,7 @@ public abstract class AbstractLuceneIndexerAndSearcherFactory implements LuceneI
// make sure the rename worked
if (!targetDir.exists())
{
throw new AlfrescoRuntimeException(
"Failed to rename temporary directory to target backup directory");
throw new AlfrescoRuntimeException("Failed to rename temporary directory to target backup directory");
}
}
}
@@ -1105,8 +1122,7 @@ public abstract class AbstractLuceneIndexerAndSearcherFactory implements LuceneI
public void execute(JobExecutionContext context) throws JobExecutionException
{
JobDataMap jobData = context.getJobDetail().getJobDataMap();
LuceneIndexBackupComponent backupComponent = (LuceneIndexBackupComponent) jobData
.get(KEY_LUCENE_INDEX_BACKUP_COMPONENT);
LuceneIndexBackupComponent backupComponent = (LuceneIndexBackupComponent) jobData.get(KEY_LUCENE_INDEX_BACKUP_COMPONENT);
if (backupComponent == null)
{
throw new JobExecutionException("Missing job data: " + KEY_LUCENE_INDEX_BACKUP_COMPONENT);
@@ -1139,6 +1155,7 @@ public abstract class AbstractLuceneIndexerAndSearcherFactory implements LuceneI
/**
* Set the ML analysis mode at search time
*
* @param mode
*/
public void setDefaultMLSearchAnalysisMode(MLAnalysisMode mode)

View File

@@ -24,6 +24,8 @@
*/
package org.alfresco.repo.search.impl.lucene;
import java.util.concurrent.ThreadPoolExecutor;
import org.alfresco.repo.search.MLAnalysisMode;
public interface LuceneConfig
@@ -73,5 +75,12 @@ public interface LuceneConfig
* @return
*/
public int getIndexerMaxFieldLength();
/**
* Get the thread pool for index merging etc
*
* @return
*/
public ThreadPoolExecutor getThreadPoolExecutor();
}

View File

@@ -60,7 +60,7 @@ public class TraceableThreadFactory implements ThreadFactory
private int threadPriority;
TraceableThreadFactory()
public TraceableThreadFactory()
{
this.group = new ThreadGroup("TraceableThreadGroup-" + factoryNumber.getAndIncrement());
TraceableThreadFactory.activeThreadGroups.add(this.group);