- Timestamp:
- 11/08/19 13:23:37 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/encryption/items/surrogates/Label.java
r1431 r1443 38 38 } 39 39 40 public static boolean isInSurrogateMode() { 41 return isInSurrogateMode; 42 } 43 44 /** 45 * Progresses surrogate mode and returns a list of labels that are currently in effect. 46 * @param context The list of expeditee Items to be considered for context. These are checked for labels. 47 * @return Returns either: 48 * <ol type='a'> 49 * <li> A list of length 1 specifying the label that the current surrogate mode accepts or </li> 50 * <li> A list of length 0 which specifies that surrogate mode is in unprivileged view or </li> 51 * <li> Null, which means there are no labels in play on this frame 52 * (so asking for surrogate mode does not make sense) </li> 53 * </ol> 54 */ 40 55 public static List<String> progressSurrogateMode(ItemsList context) { 41 56 // Maintain the local cache of user labels … … 45 60 46 61 List<String> localLabels = getLabelsFromContext(context); 47 if (userLabels.isEmpty() || localLabels.isEmpty()) { 48 // If either the labels in the context are empty or the user 49 // has no labels then we are not able to enter surrogate mode. 50 return userLabels; 51 } 62 if (localLabels.isEmpty()) { 63 // If there are no labels on this Frame return null; 64 return null; 65 } 52 66 53 67 ArrayList<String> intersection = new ArrayList<String>(userLabels);
Note:
See TracChangeset
for help on using the changeset viewer.