Changeset 1430 for trunk/src/org/expeditee/items/Item.java
- Timestamp:
- 08/14/19 14:22:44 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/Item.java
r1429 r1430 1043 1043 * TODO: What does it mean to have a negative ID# (as used in TDFC)? cts16 1044 1044 */ 1045 public int getID() 1046 { 1045 public int getID() { 1047 1046 return _id; 1048 1047 } … … 2219 2218 } 2220 2219 } 2220 2221 /** 2222 * Function called when a user attempts to set the ID of a Item. Simply provides 2223 * feedback to the user telling them that they are not allowed to do this. This 2224 * function is provided so that users are able to get the ID of a item when 2225 * extracting properties. See {@link org.expeditee.gui.AttributeUtils}. 2226 * 2227 * @param newID The requested new ID that will be ignored. 2228 */ 2229 public void setIDFail(int newID) { 2230 MessageBay.displayMessage("A user cannot change the ID of an item."); 2231 } 2221 2232 2222 2233 /** … … 4156 4167 4157 4168 public void addToSurrogates(Item surrogate) { 4169 this.getParent().removeItem(surrogate); 4158 4170 this.surrogateItems.add(surrogate); 4159 4171 surrogate.setAsSurrogateFor(this); … … 4162 4174 EncryptionDetail reencryptOnSave = new EncryptionDetail(EncryptionDetail.Type.ReencryptOnSave); 4163 4175 EncryptionDetail unencryptedOnSave = new EncryptionDetail(EncryptionDetail.Type.UnencryptedOnSave); 4164 EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);4165 4176 4166 4177 for (Character tag: DefaultFrameWriter.getItemCharTags().keySet()) { … … 4179 4190 4180 4191 for (String tag: DefaultFrameWriter.getItemStrTags().keySet()) { 4181 primaryPropertyEncryption.put(tag, inheritanceCheckOnSave.clone());4192 primaryPropertyEncryption.put(tag, unencryptedOnSave.clone()); 4182 4193 surrogate.surrogatePropertyInheritance.put(tag + "", true); 4183 4194 } … … 4231 4242 */ 4232 4243 protected boolean subjectToInheritanceCheckOnSave(String tag) { 4244 if (tag.equals(DefaultFrameWriter.TYPE_AND_ID_STR)) { 4245 return false; 4246 } 4233 4247 Item primary = getPrimary(); 4234 4248 if (primary == null) return false;
Note:
See TracChangeset
for help on using the changeset viewer.