Changeset 5341 for branches/release-0.13.x/pfixcore/src/de/schlund/pfixcore/auth/AuthConstraintImpl.java
- Timestamp:
- 09/04/10 22:05:44 (21 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/release-0.13.x/pfixcore/src/de/schlund/pfixcore/auth/AuthConstraintImpl.java
r3553 r5341 18 18 package de.schlund.pfixcore.auth; 19 19 20 import java.util.LinkedList; 21 import java.util.List; 22 23 import de.schlund.pfixcore.auth.conditions.NavigationCase; 20 24 import de.schlund.pfixcore.workflow.Context; 21 25 … … 28 32 29 33 private Condition condition; 30 private String authPage;34 private String defaultAuthPage; 31 35 private String id; 36 37 private List<NavigationCase> navigation = new LinkedList<NavigationCase>(); 32 38 33 39 public AuthConstraintImpl(String id) { 34 40 this.id = id; 41 } 42 43 public void addNavigationCase(NavigationCase navigationCase) { 44 navigation.add(navigationCase); 45 } 46 47 public List<NavigationCase> getNavigation() { 48 return navigation; 35 49 } 36 50 … … 47 61 } 48 62 49 public void setAuthPage(String authPage) {50 this.authPage = authPage;63 public String getDefaultAuthPage() { 64 return defaultAuthPage; 51 65 } 52 66 53 public String getAuthPage() { 54 return authPage; 67 public void setDefaultAuthPage(String authPage) { 68 this.defaultAuthPage = authPage; 69 } 70 71 public String getAuthPage(Context context) { 72 for (NavigationCase navcase : navigation) { 73 if (navcase.evaluate(context)) { 74 return navcase.getPage(); 75 } 76 } 77 return defaultAuthPage; 55 78 } 56 79 … … 72 95 sb.append("{"); 73 96 sb.append("id=" + id); 74 sb.append(",authpage=" + authPage);97 sb.append(",authpage=" + defaultAuthPage); 75 98 sb.append("}"); 76 99 sb.append("[");
