Changeset 7778
- Timestamp:
- 07/10/09 15:56:46 (13 months ago)
- Location:
- head/ambra/webapp/src/main/java/org/topazproject/ambra/user/action
- Files:
-
- 3 modified
-
AdminUserAlertsAction.java (modified) (2 diffs)
-
MemberUserAlertsAction.java (modified) (2 diffs)
-
UserAlertsAction.java (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
head/ambra/webapp/src/main/java/org/topazproject/ambra/user/action/AdminUserAlertsAction.java
r6940 r7778 2 2 * $Id$ 3 3 * 4 * Copyright (c) 2006-200 8by Topaz, Inc.4 * Copyright (c) 2006-2009 by Topaz, Inc. 5 5 * http://topazproject.org 6 6 * … … 45 45 } 46 46 47 /** Using by freemarker to indicate that the user profile is being edited by an admin */ 47 /** 48 * Using by freemarker to indicate that the user profile is being edited by an admin 49 * @return true 50 */ 48 51 public boolean getIsEditedByAdmin() { 49 52 return true; 50 53 } 54 55 /** 56 * Get user being modified by administrator 57 * @return AmbraUser object of the user specified in topazId 58 * @throws ApplicationException 59 */ 60 @Override 61 protected AmbraUser getAmbraUserToUse() throws ApplicationException { 62 return getUserService().getUserByTopazId(topazId); 63 } 51 64 } -
head/ambra/webapp/src/main/java/org/topazproject/ambra/user/action/MemberUserAlertsAction.java
r6940 r7778 2 2 * $Id$ 3 3 * 4 * Copyright (c) 2006-200 8by Topaz, Inc.4 * Copyright (c) 2006-2009 by Topaz, Inc. 5 5 * http://topazproject.org 6 6 * … … 26 26 */ 27 27 public class MemberUserAlertsAction extends UserAlertsAction { 28 29 /** 30 * Get logged in user 31 * @return currently logged in user object 32 */ 33 @Override 34 protected AmbraUser getAmbraUserToUse() { 35 return getCurrentUser(); 36 } 28 37 } -
head/ambra/webapp/src/main/java/org/topazproject/ambra/user/action/UserAlertsAction.java
r7197 r7778 2 2 * $Id$ 3 3 * 4 * Copyright (c) 2006-200 8by Topaz, Inc.4 * Copyright (c) 2006-2009 by Topaz, Inc. 5 5 * http://topazproject.org 6 6 * … … 37 37 import org.topazproject.ambra.user.AmbraUser; 38 38 import org.topazproject.ambra.user.service.UserAlert; 39 import org.topazproject.ambra.ApplicationException; 39 40 40 41 /** … … 119 120 @Transactional(rollbackFor = { Throwable.class }) 120 121 public String saveAlerts() throws Exception { 121 final AmbraUser ambraUser = get CurrentUser();122 final AmbraUser ambraUser = getAmbraUserToUse(); 122 123 if (ambraUser == null) { 123 124 throw new ServletException("Unable to resolve ambra user"); … … 153 154 @Transactional(readOnly = true) 154 155 public String retrieveAlerts() throws Exception { 155 final AmbraUser ambraUser = get CurrentUser();156 final AmbraUser ambraUser = getAmbraUserToUse(); 156 157 if (ambraUser == null) { 157 158 throw new ServletException("Unable to resolve ambra user"); … … 226 227 this.displayName = displayName; 227 228 } 229 230 /** 231 * Provides a way to get the AmbraUser to edit 232 * @return the AmbraUser to edit 233 * @throws org.topazproject.ambra.ApplicationException ApplicationException 234 */ 235 protected abstract AmbraUser getAmbraUserToUse() throws ApplicationException; 236 228 237 }
