String methodName = invocation.getMethod().getName(); if (I18NUtil.getContentLocaleOrNull() == null)
Locale filterLocale = I18NUtil.getContentLocaleOrNull(); if (filterLocale == null)
String methodName = invocation.getMethod().getName(); if (I18NUtil.getContentLocaleOrNull() == null)
Locale filterLocale = I18NUtil.getContentLocaleOrNull(); if (filterLocale == null)
Locale currentContentLocale = I18NUtil.getContentLocaleOrNull();
Locale currentContentLocale = I18NUtil.getContentLocaleOrNull();
public void testShallowFilesAndFoldersListWithLocale() throws Exception { Locale savedLocale = I18NUtil.getContentLocaleOrNull(); try { I18NUtil.setContentLocale(Locale.CANADA); List<FileInfo> files = fileFolderService.list(workingRootNodeRef); // check String[] expectedNames = new String[] { NAME_L0_FILE_A, NAME_L0_FILE_B, NAME_L0_FOLDER_A, NAME_L0_FOLDER_B, NAME_L0_FOLDER_C }; checkFileList(files, 2, 3, expectedNames); } finally { I18NUtil.setContentLocale(savedLocale); } }
/** * Validates <a href="https://issues.alfresco.com/jira/browse/ALFCOM-2655">ACT-7225</a> */ public void testGetType() throws Exception { Locale savedLocale = I18NUtil.getContentLocaleOrNull(); try { I18NUtil.setContentLocale(Locale.CANADA); FileFolderServiceType type = fileFolderService.getType(ContentModel.TYPE_FOLDER); assertEquals("Type incorrect for folder", FileFolderServiceType.FOLDER, type); } finally { I18NUtil.setContentLocale(savedLocale); } }