Index: lams_common/src/java/org/lamsfoundation/lams/themes/service/ThemeService.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r634269e4b02afdd79f488d76652121066cc5113d --- lams_common/src/java/org/lamsfoundation/lams/themes/service/ThemeService.java (.../ThemeService.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_common/src/java/org/lamsfoundation/lams/themes/service/ThemeService.java (.../ThemeService.java) (revision 634269e4b02afdd79f488d76652121066cc5113d) @@ -58,10 +58,6 @@ protected MessageService messageService; protected IUserManagementService userManagementService; - /** for sending acknowledgment/error messages back to flash */ - private FlashMessage flashMessage; - - public ThemeService() { } @@ -123,6 +119,7 @@ */ public String storeTheme(String wddxPacket) throws Exception { + FlashMessage flashMessage= null; Hashtable table = (Hashtable)WDDXProcessor.deserialize(wddxPacket); CSSThemeDTO themeDTO = new CSSThemeDTO(table); @@ -157,6 +154,7 @@ * @throws Exception */ public String getTheme(Long themeId)throws IOException { + FlashMessage flashMessage= null; CSSThemeVisualElement theme = themeDAO.getThemeById(themeId); if(theme==null) flashMessage = FlashMessage.getNoSuchTheme("wddxPacket",themeId); @@ -177,6 +175,7 @@ * @throws IOException */ public String getThemes() throws IOException { + FlashMessage flashMessage= null; List themes = themeDAO.getAllThemes(); ArrayList themeList = new ArrayList(); Iterator iterator = themes.iterator(); @@ -195,6 +194,7 @@ * @throws IOException */ private FlashMessage setTheme(Integer userId, Long themeId, String type) throws IOException, ThemeException, UserException { + FlashMessage flashMessage= null; User user = (User)userManagementService.findById(User.class,userId); CSSThemeVisualElement theme = themeDAO.getThemeById(themeId); Index: lams_common/src/java/org/lamsfoundation/lams/util/wddx/FlashMessage.java =================================================================== diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r634269e4b02afdd79f488d76652121066cc5113d --- lams_common/src/java/org/lamsfoundation/lams/util/wddx/FlashMessage.java (.../FlashMessage.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf) +++ lams_common/src/java/org/lamsfoundation/lams/util/wddx/FlashMessage.java (.../FlashMessage.java) (revision 634269e4b02afdd79f488d76652121066cc5113d) @@ -29,9 +29,11 @@ /** * @author Manpreet Minhas * This class represents the message sent by the server to the - * Flash client. - * - * TODO Flash messages require internationalisation. + * Flash client. The error messages in this class should only + * be generic error messages that may be used in various modules. + * The errors are not I18N'd as we assume Flash will not show the + * error to the user - but the error is included in the Flash dump + * file so it should still be meaningful. */ public class FlashMessage implements Serializable { @@ -116,7 +118,7 @@ } return wddxPacket; } - public static FlashMessage getNoSuchUserExists(String methodName, Integer userID){ + public static FlashMessage getNoSuchUserExists(String methodName, Integer userID){ return new FlashMessage(methodName, "No such User with a user_id of :" + userID + " exists", ERROR);