- Timestamp:
- 01/30/20 13:03:50 (4 years ago)
- Location:
- trunk/src/org/expeditee
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/auth/account/Create.java
r1504 r1505 255 255 if (f.getNumber() != AuthenticatorBrowser.CREDENTIALS_FRAME && 256 256 f.getNumber() != AuthenticatorBrowser.PASSWORD_RECOVERY_FRAME) { 257 f.set EncryptionLabel(AuthenticatorBrowser.PROFILEENCRYPTIONLABEL);257 f.setFrameEncryptionLabel(AuthenticatorBrowser.PROFILEENCRYPTIONLABEL); 258 258 } 259 259 Collection<Item> secretsLink = Actions.getByContent(f, "Secrets"); -
trunk/src/org/expeditee/encryption/items/UserAppliedEncryptionPermission.java
r1374 r1505 2 2 3 3 public enum UserAppliedEncryptionPermission { 4 none(0), homogeneous(1), hetrogeneous_ limited(2), hetrogeneous(3), full(4);4 none(0), homogeneous(1), hetrogeneous_owner(2), hetrogeneous(3); 5 5 6 6 private final int val; -
trunk/src/org/expeditee/gui/AttributeUtils.java
r1477 r1505 185 185 */ 186 186 187 // Frames187 // Standard Frame attributes 188 188 _FrameAttrib.put("Permission", Frame.class.getMethod("getPermission"), 189 189 Frame.class.getMethod("setPermission", pPermission)); … … 200 200 _FrameAttrib.put("BackgroundColor", Frame.class.getMethod("getBackgroundColor"), 201 201 Frame.class.getMethod("setBackgroundColor", pColor)); 202 _FrameAttrib.put("EncryptionLabel", Frame.class.getMethod("getEncryptionLabel"),203 Frame.class.getMethod("setEncryptionLabel", pString));204 _FrameAttrib.put("EncPermission", Frame.class.getMethod("getEncryptionPermission"),205 Frame.class.getMethod("setEncryptionPermission", pEncPermission));206 202 _FrameAttrib.put("Group", Frame.class.getMethod("getGroup"), 207 203 Frame.class.getMethod("setGroup", pString)); 208 204 209 210 // aliases for attribute setting 205 // Encryption Frame attributes 206 _FrameAttrib.put("FrameEncryptionLabel", Frame.class.getMethod("getFrameEncryptionLabel"), 207 Frame.class.getMethod("setFrameEncryptionLabel", pString)); 208 _FrameAttrib.put("EncryptionFramePermission", Frame.class.getMethod("getFrameEncryptionPermission"), 209 Frame.class.getMethod("setFrameEncryptionPermission", pEncPermission)); 210 _FrameAttrib.put("HomogeneousEncryptionLabel", Frame.class.getMethod("getHomogeneousEncryptionLabel"), 211 Frame.class.getMethod("setHomogeneousEncryptionLabel", pString)); 212 _FrameAttrib.put("EncryptionPermission", Frame.class.getMethod("getEncryptionPermission"), 213 Frame.class.getMethod("setEncryptionPermission", pEncPermission)); 214 215 // aliases for Standard frame attribute settings 211 216 _FrameAttrib.alias("fgc", "foregroundcolor"); 212 217 _FrameAttrib.alias("bgc", "backgroundcolor"); 213 218 _FrameAttrib.alias("p", "permission"); 214 _FrameAttrib.alias("enc", "encryptionlabel"); 215 _FrameAttrib.alias("encp", "encpermission"); 216 _FrameAttrib.alias("EncryptionPermission", "encpermission"); 217 219 220 // aliases for Encryption frame attribute settings 221 _FrameAttrib.alias("encframelabel", "FrameEncryptionLabel"); 222 _FrameAttrib.alias("encframeperm", "EncryptionFramePermission"); 223 _FrameAttrib.alias("homoenclabel", "HomogeneousEncryptionLabel"); 224 _FrameAttrib.alias("encperm", "EncryptionPermission"); 218 225 219 226 // Generic Items -
trunk/src/org/expeditee/gui/Frame.java
r1502 r1505 117 117 private PermissionTriple _permissionTriple = null; 118 118 119 private EncryptionPermissionTriple _encPermissionTriple = null; 119 private EncryptionPermissionTriple _frameEncryptionPermission = null; 120 121 private EncryptionPermissionTriple _itemEncryptionPermission = null; 120 122 121 123 private String _owner = null; … … 154 156 private ItemsList _primaryItemsBody = new ItemsList(); 155 157 private ItemsList _surrogateItemsBody = new ItemsList(); 156 157 //private List<Item> _body = new ArrayList<Item>();158 //private List<Item> _bodyHiddenDueToPermissions = new ArrayList<Item>();159 //private List<Item> _primaryItemsBody = new ArrayList<Item>();160 //private List<Item> _surrogateItemsBody = new ArrayList<Item>();161 158 162 159 // for drawing purposes … … 199 196 private String _encryptionLabel; 200 197 198 private String _homogeneousEncryptionLabel; 199 201 200 private String _groupFrameName; 202 201 private Frame _groupFrame = null; … … 217 216 218 217 public boolean isEncryptableFrame() { 219 boolean hasEncryptionLabel = this.get EncryptionLabel() != null;218 boolean hasEncryptionLabel = this.getFrameEncryptionLabel() != null; 220 219 boolean isProfileFrame = this.getPath().equals(FrameIO.PROFILE_PATH); 221 220 boolean isCredentialsFrame = isProfileFrame && this.getNumber() == AuthenticatorBrowser.CREDENTIALS_FRAME; … … 580 579 public Item getNameItem() { 581 580 //Text ret = _frameName; 582 if (this.get EncryptionLabel() != null && this.getEncryptionLabel().length() > 0) {581 if (this.getFrameEncryptionLabel() != null && this.getFrameEncryptionLabel().length() > 0) { 583 582 _frameName.setText("\uD83D\uDD12" + getFramesetName() + _number); 584 583 _frameName.resetFrameNamePosition(); … … 3001 3000 return _interactableItems; 3002 3001 } 3003 3004 public String getEncryptionLabel() { 3002 3003 /** Encryption related functions start **/ 3004 public String getFrameEncryptionLabel() { 3005 3005 return _encryptionLabel; 3006 3006 } 3007 3007 3008 public void set EncryptionLabel(String label) {3008 public void setFrameEncryptionLabel(String label) { 3009 3009 LabelInfo labelResult = Label.getLabel(label); 3010 3010 boolean isProfileOrNone = label.equals("Profile") || label.equals("None"); … … 3019 3019 } 3020 3020 3021 public EncryptionPermissionTriple getFrameEncryptionPermission() { 3022 return _frameEncryptionPermission; 3023 } 3024 3025 public void setFrameEncryptionPermission(EncryptionPermissionTriple p) { 3026 _frameEncryptionPermission = p; 3027 } 3028 3029 public String getHomogeneousEncryptionLabel() { 3030 return _homogeneousEncryptionLabel; 3031 } 3032 3033 public void setHomogeneousEncryptionLabel(String label) { 3034 LabelInfo labelResult = Label.getLabel(label); 3035 boolean isProfileOrNone = label.equals("Profile") || label.equals("None"); 3036 if (!isProfileOrNone && !labelResult.is(LabelResult.SuccessResolveLabelToKey)) { 3037 MessageBay.displayMessage(labelResult.toString()); 3038 this._homogeneousEncryptionLabel = null; 3039 return; 3040 } 3041 3042 this.setChanged(true); 3043 _homogeneousEncryptionLabel = label; 3044 } 3045 3021 3046 public EncryptionPermissionTriple getEncryptionPermission() { 3022 return _ encPermissionTriple;3047 return _itemEncryptionPermission; 3023 3048 } 3024 3049 3025 3050 public void setEncryptionPermission(EncryptionPermissionTriple p) { 3026 _encPermissionTriple = p; 3027 } 3051 _itemEncryptionPermission = p; 3052 } 3053 /** Encryption related functions end **/ 3028 3054 3029 3055 public String getGroup() { -
trunk/src/org/expeditee/gui/FrameCreator.java
r1415 r1505 173 173 174 174 if (encryptionLabel != null && encryptionLabel.length() > 0) { 175 toUse.set EncryptionLabel(encryptionLabel);175 toUse.setFrameEncryptionLabel(encryptionLabel); 176 176 } 177 177 … … 252 252 253 253 if (encryptionLabel != null && encryptionLabel.length() > 0) { 254 newFrame.set EncryptionLabel(encryptionLabel);254 newFrame.setFrameEncryptionLabel(encryptionLabel); 255 255 } 256 256 -
trunk/src/org/expeditee/gui/FrameIO.java
r1504 r1505 1146 1146 1147 1147 if (toSave.isEncryptableFrame()) { 1148 String encryptionLabel = toSave.get EncryptionLabel();1148 String encryptionLabel = toSave.getFrameEncryptionLabel(); 1149 1149 writer = new EncryptedExpWriter(encryptionLabel); 1150 1150 } else { -
trunk/src/org/expeditee/io/Conversion.java
r1415 r1505 522 522 value = value.trim(); 523 523 524 if ((method.getParameterTypes()[0].isEnum()) || (name.matches("setPermission")) || (name.matches("set EncryptionPermission"))) {524 if ((method.getParameterTypes()[0].isEnum()) || (name.matches("setPermission")) || (name.matches("setFrameEncryptionPermission"))) { 525 525 Method convertString; 526 526 Object[] objects = new Object[1]; -
trunk/src/org/expeditee/io/DefaultFrameReader.java
r1415 r1505 83 83 84 84 try { 85 /// C H I J L N P Q R S W X Y Z 86 /// a b c f g h i j l m n o q r s t u v w x y z 87 // Standard frame tags 85 88 _FrameTags.put('A', Frame.class.getMethod("setName", pString)); 86 89 _FrameTags.put('V', Frame.class.getMethod("setVersion", pInt)); … … 93 96 _FrameTags.put('O', Frame.class.getMethod("setForegroundColor", pColor)); 94 97 _FrameTags.put('B', Frame.class.getMethod("setBackgroundColor", pColor)); 95 _FrameTags.put('K', Frame.class.getMethod("setEncryptionLabel", pString));96 98 _FrameTags.put('T', Frame.class.getMethod("addToData", pString)); 97 _FrameTags.put('E', Frame.class.getMethod("setEncryptionPermission", pEncPermission));98 99 _FrameTags.put('G', Frame.class.getMethod("setGroup", pString)); 100 101 // Encryption frame tags 102 _FrameTags.put('K', Frame.class.getMethod("setFrameEncryptionLabel", pString)); 103 _FrameTags.put('E', Frame.class.getMethod("setFrameEncryptionPermission", pEncPermission)); 104 _FrameTags.put('k', Frame.class.getMethod("setHomogeneousEncryptionLabel", pString)); 105 _FrameTags.put('e', Frame.class.getMethod("setEncryptionPermission", pEncPermission)); 99 106 100 107 // Note: As of 26/11/18 there are no unused letter item tags. Use other characters. -
trunk/src/org/expeditee/io/DefaultFrameWriter.java
r1418 r1505 178 178 { 179 179 try { 180 /// C H I J L N P Q R S W X Y Z 181 /// a b c f g h i j l m n o q r s t u v w x y z 182 // Standard frame tags 180 183 _FrameTags.put('V', Frame.class.getMethod("getVersion")); 181 184 _FrameTags.put('p', Frame.class.getMethod("getPermission")); … … 187 190 _FrameTags.put('O', Frame.class.getMethod("getForegroundColor")); 188 191 _FrameTags.put('B', Frame.class.getMethod("getBackgroundColor")); 189 _FrameTags.put('K', Frame.class.getMethod("getEncryptionLabel"));190 192 _FrameTags.put('T', Frame.class.getMethod("getData")); 191 _FrameTags.put('E', Frame.class.getMethod("getEncryptionPermission"));192 193 _FrameTags.put('G', Frame.class.getMethod("getGroup")); 194 195 // Encryption frame tags 196 _FrameTags.put('K', Frame.class.getMethod("getFrameEncryptionLabel")); 197 _FrameTags.put('E', Frame.class.getMethod("getFrameEncryptionPermission")); 198 _FrameTags.put('k', Frame.class.getMethod("getHomogeneousEncryptionLabel")); 199 _FrameTags.put('e', Frame.class.getMethod("getEncryptionPermission")); 193 200 194 201 // Note: As of 26/11/18 there are no unused letter item tags. Use other characters. -
trunk/src/org/expeditee/items/Item.java
r1477 r1505 4102 4102 this._encryptionLabel = label; 4103 4103 4104 if (this.getParent().get EncryptionLabel() == null) {4104 if (this.getParent().getFrameEncryptionLabel() == null) { 4105 4105 MessageBay.displayMessage("Items can only be entrypted if the frame they are on is."); 4106 4106 return;
Note:
See TracChangeset
for help on using the changeset viewer.