mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix for ETHREEOH-220 (I18N issue with tag scopes) and readded init-method to async action queues (stopped unit tests dependant on callback from running)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@11213 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -34,7 +34,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="defaultAsynchronousActionExecutionQueue" class="org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl">
|
<bean id="defaultAsynchronousActionExecutionQueue" class="org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl" init-method="init">
|
||||||
<property name="threadPoolExecutor">
|
<property name="threadPoolExecutor">
|
||||||
<ref bean="defaultAsyncThreadPool"/>
|
<ref bean="defaultAsyncThreadPool"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="deploymentAsynchronousActionExecutionQueue" class="org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl">
|
<bean id="deploymentAsynchronousActionExecutionQueue" class="org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl" init-method="init">
|
||||||
<property name="threadPoolExecutor">
|
<property name="threadPoolExecutor">
|
||||||
<ref bean="deploymentAsyncThreadPool"/>
|
<ref bean="deploymentAsyncThreadPool"/>
|
||||||
</property>
|
</property>
|
||||||
|
@@ -674,9 +674,9 @@ public class TaggingServiceImpl implements TaggingService,
|
|||||||
{
|
{
|
||||||
List<TagDetails> result = new ArrayList<TagDetails>(25);
|
List<TagDetails> result = new ArrayList<TagDetails>(25);
|
||||||
|
|
||||||
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"));
|
||||||
String nextLine = reader.readLine();
|
String nextLine = reader.readLine();
|
||||||
while (nextLine != null)
|
while (nextLine != null)
|
||||||
{
|
{
|
||||||
|
@@ -41,6 +41,7 @@ import org.alfresco.repo.policy.PolicyComponent;
|
|||||||
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
||||||
import org.alfresco.service.cmr.action.Action;
|
import org.alfresco.service.cmr.action.Action;
|
||||||
import org.alfresco.service.cmr.action.ActionService;
|
import org.alfresco.service.cmr.action.ActionService;
|
||||||
|
import org.alfresco.service.cmr.repository.ContentReader;
|
||||||
import org.alfresco.service.cmr.repository.ContentService;
|
import org.alfresco.service.cmr.repository.ContentService;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.service.cmr.repository.NodeService;
|
import org.alfresco.service.cmr.repository.NodeService;
|
||||||
@@ -82,6 +83,7 @@ public class TaggingServiceImplTest extends BaseAlfrescoSpringTest
|
|||||||
private static final String TAG_3 = "Tag Three";
|
private static final String TAG_3 = "Tag Three";
|
||||||
private static final String TAG_4 = "tag four";
|
private static final String TAG_4 = "tag four";
|
||||||
private static final String TAG_5 = "tag five";
|
private static final String TAG_5 = "tag five";
|
||||||
|
private static final String TAG_I18N = "àâæçéèêëîïôœùûüÿñ";
|
||||||
|
|
||||||
private static final String UPPER_TAG = "House";
|
private static final String UPPER_TAG = "House";
|
||||||
private static final String LOWER_TAG = "house";
|
private static final String LOWER_TAG = "house";
|
||||||
@@ -279,7 +281,7 @@ public class TaggingServiceImplTest extends BaseAlfrescoSpringTest
|
|||||||
assertNotNull(tags);
|
assertNotNull(tags);
|
||||||
assertEquals(2, tags.size());
|
assertEquals(2, tags.size());
|
||||||
assertTrue(tags.contains(TAG_1));
|
assertTrue(tags.contains(TAG_1));
|
||||||
assertTrue(tags.contains(TAG_2));
|
assertTrue(tags.contains(TAG_2));
|
||||||
|
|
||||||
this.taggingService.removeTag(this.document, TAG_1);
|
this.taggingService.removeTag(this.document, TAG_1);
|
||||||
tags = this.taggingService.getTags(this.document);
|
tags = this.taggingService.getTags(this.document);
|
||||||
@@ -496,6 +498,31 @@ public class TaggingServiceImplTest extends BaseAlfrescoSpringTest
|
|||||||
assertEquals(1, ts1.getTag(TAG_4).getCount());
|
assertEquals(1, ts1.getTag(TAG_4).getCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* https://issues.alfresco.com/jira/browse/ETHREEOH-220
|
||||||
|
*/
|
||||||
|
public void testETHREEOH_220() throws Exception
|
||||||
|
{
|
||||||
|
this.taggingService.addTagScope(this.folder);;
|
||||||
|
this.taggingService.addTag(this.folder, TAG_I18N);
|
||||||
|
waitForActionExecution();
|
||||||
|
|
||||||
|
// Get the tag from the node
|
||||||
|
List<String> tags = this.taggingService.getTags(this.folder);
|
||||||
|
assertNotNull(tags);
|
||||||
|
assertEquals(1, tags.size());
|
||||||
|
assertEquals(TAG_I18N, tags.get(0));
|
||||||
|
|
||||||
|
// Get the tag from the tagscope
|
||||||
|
TagScope tagScope = this.taggingService.findTagScope(this.folder);
|
||||||
|
assertNotNull(tagScope);
|
||||||
|
assertEquals(1, tagScope.getTags().size());
|
||||||
|
TagDetails tagDetails = tagScope.getTag(TAG_I18N);
|
||||||
|
assertNotNull(tagDetails);
|
||||||
|
assertEquals(TAG_I18N, tagDetails.getName());
|
||||||
|
assertEquals(1, tagDetails.getCount());
|
||||||
|
}
|
||||||
|
|
||||||
// == Test the JavaScript API ==
|
// == Test the JavaScript API ==
|
||||||
|
|
||||||
public void testJSAPI() throws Exception
|
public void testJSAPI() throws Exception
|
||||||
|
Reference in New Issue
Block a user