Changeset 1414 for trunk/src/org/expeditee/items/Item.java
- Timestamp:
- 06/26/19 16:02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/Item.java
r1413 r1414 320 320 private Item surrogateFor = null; 321 321 private Set<Item> surrogateItems = new HashSet<Item>(); 322 private static Map<String, EncryptionDetail> classicPropertyEncryptionDefault = new HashMap<String, EncryptionDetail>();322 private static Map<String, EncryptionDetail> primaryPropertyEncryptionDefault = new HashMap<String, EncryptionDetail>(); 323 323 private static Map<String, Boolean> surrogatePropertyInheritanceDefault = new HashMap<String, Boolean>(); 324 protected Map<String, EncryptionDetail> classicPropertyEncryption = new HashMap<String, EncryptionDetail>(classicPropertyEncryptionDefault);324 protected Map<String, EncryptionDetail> primaryPropertyEncryption = new HashMap<String, EncryptionDetail>(primaryPropertyEncryptionDefault); 325 325 protected Map<String, Boolean> surrogatePropertyInheritance = new HashMap<String, Boolean>(surrogatePropertyInheritanceDefault); 326 326 … … 332 332 surrogatePropertyInheritanceDefault.put(tag + "", true); 333 333 } 334 classicPropertyEncryptionDefault.put(tag + "", EncryptionDetail.UnencryptedOnSave);334 primaryPropertyEncryptionDefault.put(tag + "", EncryptionDetail.UnencryptedOnSave); 335 335 } 336 336 337 337 for(String tag: DefaultFrameWriter.getItemTagsExt().keySet()) { 338 338 surrogatePropertyInheritanceDefault.put(tag, true); 339 classicPropertyEncryptionDefault.put(tag, EncryptionDetail.UnencryptedOnSave);339 primaryPropertyEncryptionDefault.put(tag, EncryptionDetail.UnencryptedOnSave); 340 340 } 341 341 } … … 436 436 if (isSurrogate()) { 437 437 surrogatePropertyInheritance.put(DefaultFrameWriter.DOT_TYPE_STR, false); 438 Item classic = getClassic();438 Item primary = getPrimary(); 439 439 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DOT_TYPE_STR)) { 440 classic.classicPropertyEncryption.put(DefaultFrameWriter.DOT_TYPE_STR, EncryptionDetail.InheritanceCheckOnSave);440 primary.primaryPropertyEncryption.put(DefaultFrameWriter.DOT_TYPE_STR, EncryptionDetail.InheritanceCheckOnSave); 441 441 } 442 442 } … … 445 445 public DotType getDotType() { 446 446 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.DOT_TYPE_STR)) { 447 return this.get Classic().getDotType();447 return this.getPrimary().getDotType(); 448 448 } else { 449 449 return _type; … … 459 459 if (isSurrogate()) { 460 460 surrogatePropertyInheritance.put(DefaultFrameWriter.FILLED_STR, false); 461 Item classic = getClassic();461 Item primary = getPrimary(); 462 462 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DOT_TYPE_STR)) { 463 classic.classicPropertyEncryption.put(DefaultFrameWriter.FILLED_STR, EncryptionDetail.InheritanceCheckOnSave);463 primary.primaryPropertyEncryption.put(DefaultFrameWriter.FILLED_STR, EncryptionDetail.InheritanceCheckOnSave); 464 464 } 465 465 } … … 468 468 public boolean getFilled() { 469 469 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.FILLED_STR)) { 470 return this.get Classic().getFilled();470 return this.getPrimary().getFilled(); 471 471 } else { 472 472 return _filled; … … 492 492 if (isSurrogate()) { 493 493 surrogatePropertyInheritance.put(DefaultFrameWriter.GRADIENT_ANGLE_STR, false); 494 Item classic = getClassic();494 Item primary = getPrimary(); 495 495 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DOT_TYPE_STR)) { 496 classic.classicPropertyEncryption.put(DefaultFrameWriter.GRADIENT_ANGLE_STR, EncryptionDetail.InheritanceCheckOnSave);496 primary.primaryPropertyEncryption.put(DefaultFrameWriter.GRADIENT_ANGLE_STR, EncryptionDetail.InheritanceCheckOnSave); 497 497 } 498 498 } … … 506 506 public double getGradientAngle() { 507 507 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.GRADIENT_ANGLE_STR)) { 508 return this.get Classic().getGradientAngle();508 return this.getPrimary().getGradientAngle(); 509 509 } else { 510 510 return _gradientAngle; … … 565 565 if (isSurrogate()) { 566 566 surrogatePropertyInheritance.put(DefaultFrameWriter.PERMISSION_STR, false); 567 Item classic = getClassic();567 Item primary = getPrimary(); 568 568 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DOT_TYPE_STR)) { 569 classic.classicPropertyEncryption.put(DefaultFrameWriter.PERMISSION_STR, EncryptionDetail.InheritanceCheckOnSave);569 primary.primaryPropertyEncryption.put(DefaultFrameWriter.PERMISSION_STR, EncryptionDetail.InheritanceCheckOnSave); 570 570 } 571 571 } … … 574 574 public PermissionTriple getPermission() { 575 575 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.PERMISSION_STR)) { 576 return this.get Classic().getPermission();576 return this.getPrimary().getPermission(); 577 577 } else { 578 578 return _permissionTriple; … … 724 724 public List<String> getAction() { 725 725 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_STR)) { 726 return this.get Classic().getAction();726 return this.getPrimary().getAction(); 727 727 } else { 728 728 return _actions; … … 732 732 public List<String> getData() { 733 733 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.DATA_STR)) { 734 return this.get Classic().getData();734 return this.getPrimary().getData(); 735 735 } else { 736 736 return _data.getData(); … … 740 740 public List<String> getActionCursorEnter() { 741 741 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_CURSOR_ENTER_STR)) { 742 return this.get Classic().getActionCursorEnter();742 return this.getPrimary().getActionCursorEnter(); 743 743 } else { 744 744 return _actionCursorEnter; … … 748 748 public List<String> getActionCursorLeave() { 749 749 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_CURSOR_LEAVE_STR)) { 750 return this.get Classic().getActionCursorLeave();750 return this.getPrimary().getActionCursorLeave(); 751 751 } else { 752 752 return _actionCursorLeave; … … 756 756 public List<String> getActionEnterFrame() { 757 757 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_ENTER_FRAME_STR)) { 758 return this.get Classic().getActionEnterFrame();758 return this.getPrimary().getActionEnterFrame(); 759 759 } else { 760 760 return _actionEnterFrame; … … 764 764 public List<String> getActionLeaveFrame() { 765 765 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_LEAVE_FRAME_STR)) { 766 return this.get Classic().getActionLeaveFrame();766 return this.getPrimary().getActionLeaveFrame(); 767 767 } else { 768 768 return _actionLeaveFrame; … … 772 772 public boolean getActionMark() { 773 773 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ACTION_MARK_STR)) { 774 return this.get Classic().getActionMark();774 return this.getPrimary().getActionMark(); 775 775 } else { 776 776 return _actionMark; … … 797 797 public String getArrow() { 798 798 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ARROW_STR)) { 799 return this.get Classic().getArrow();799 return this.getPrimary().getArrow(); 800 800 } else { 801 801 if (!hasVisibleArrow()) … … 832 832 public Colour getBackgroundColor() { 833 833 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.BACKGROUND_COLOR_STR)) { 834 return this.get Classic().getBackgroundColor();834 return this.getPrimary().getBackgroundColor(); 835 835 } else { 836 836 return _backgroundColour; … … 840 840 public Colour getBorderColor() { 841 841 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.BORDER_COLOR_STR)) { 842 return this.get Classic().getBorderColor();842 return this.getPrimary().getBorderColor(); 843 843 } else { 844 844 return _colorBorder; … … 917 917 public Colour getColor() { 918 918 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.COLOR_STR)) { 919 return this.get Classic().getColor();919 return this.getPrimary().getColor(); 920 920 } else { 921 921 return _foregroundColour; … … 934 934 public String getConstraintIDs() { 935 935 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.CONSTRAINT_IDS_STR)) { 936 return this.get Classic().getConstraintIDs();936 return this.getPrimary().getConstraintIDs(); 937 937 } else { 938 938 if (_constraints == null || _constraints.size() == 0) … … 971 971 public String getDateCreated() { 972 972 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.DATE_CREATED_STR)) { 973 return this.get Classic().getDateCreated();973 return this.getPrimary().getDateCreated(); 974 974 } else { 975 975 return _creationDate; … … 979 979 public Colour getFillColor() { 980 980 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.FILL_COLOR_STR)) { 981 return this.get Classic().getFillColor();981 return this.getPrimary().getFillColor(); 982 982 } else { 983 983 return _fillColour; … … 987 987 public String getFillPattern() { 988 988 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.FILL_PATTERN_STR)) { 989 return this.get Classic().getFillPattern();989 return this.getPrimary().getFillPattern(); 990 990 } else { 991 991 return _fillPattern; … … 1008 1008 public boolean getHighlight() { 1009 1009 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.HIGHLIGHT_STR)) { 1010 return this.get Classic().getHighlight();1010 return this.getPrimary().getHighlight(); 1011 1011 } else { 1012 1012 return _highlight; … … 1040 1040 public String getLineIDs() { 1041 1041 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINE_IDS_STR)) { 1042 return this.get Classic().getLineIDs();1042 return this.getPrimary().getLineIDs(); 1043 1043 } else { 1044 1044 String lineID = null; … … 1057 1057 public int[] getLinePattern() { 1058 1058 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINE_PATTERN_STR)) { 1059 return this.get Classic().getLinePattern();1059 return this.getPrimary().getLinePattern(); 1060 1060 } else { 1061 1061 return _linePattern; … … 1083 1083 public String getLink() { 1084 1084 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINK_STR)) { 1085 return this.get Classic().getLink();1085 return this.getPrimary().getLink(); 1086 1086 } else { 1087 1087 return _link; … … 1091 1091 public String getFormula() { 1092 1092 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.FORMULA_STR)) { 1093 return this.get Classic().getFormula();1093 return this.getPrimary().getFormula(); 1094 1094 } else { 1095 1095 return _formula; … … 1112 1112 if (isSurrogate()) { 1113 1113 surrogatePropertyInheritance.put(DefaultFrameWriter.FORMULA_STR, false); 1114 Item classic = getClassic();1114 Item primary = getPrimary(); 1115 1115 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.FORMULA_STR)) { 1116 classic.classicPropertyEncryption.put(DefaultFrameWriter.FORMULA_STR, EncryptionDetail.InheritanceCheckOnSave);1116 primary.primaryPropertyEncryption.put(DefaultFrameWriter.FORMULA_STR, EncryptionDetail.InheritanceCheckOnSave); 1117 1117 } 1118 1118 } … … 1127 1127 public String getLinkFrameset() { 1128 1128 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINK_FRAMESET_STR)) { 1129 return this.get Classic().getLinkFrameset();1129 return this.getPrimary().getLinkFrameset(); 1130 1130 } else { 1131 1131 return _link_frameset; … … 1135 1135 public boolean getLinkMark() { 1136 1136 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINK_MARK_STR)) { 1137 return this.get Classic().getLinkMark();1137 return this.getPrimary().getLinkMark(); 1138 1138 } else { 1139 1139 return _linkMark; … … 1143 1143 public String getLinkTemplate() { 1144 1144 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINK_TEMPLATE_STR)) { 1145 return this.get Classic().getLinkTemplate();1145 return this.getPrimary().getLinkTemplate(); 1146 1146 } else { 1147 1147 return _link_template; … … 1156 1156 public String getOwner() { 1157 1157 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.OWNER_STR)) { 1158 return this.get Classic().getOwner();1158 return this.getPrimary().getOwner(); 1159 1159 } else { 1160 1160 return _owner; … … 1276 1276 public final Point getPosition() { 1277 1277 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.POSITION_STR)) { 1278 return this.get Classic().getPosition();1278 return this.getPrimary().getPosition(); 1279 1279 } else { 1280 1280 return new Point(getX(), getY()); … … 1306 1306 public String getTypeAndID() { 1307 1307 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.TYPE_AND_ID_STR)) { 1308 return this.get Classic().getTypeAndID();1308 return this.getPrimary().getTypeAndID(); 1309 1309 } else { 1310 1310 return "T " + getID(); … … 1314 1314 public Integer getWidthToSave() { 1315 1315 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.WIDTH_TO_SAVE_STR)) { 1316 return this.get Classic().getWidthToSave();1316 return this.getPrimary().getWidthToSave(); 1317 1317 } else { 1318 1318 return getWidth(); … … 1322 1322 public Integer getMinWidthToSave() { 1323 1323 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MIN_WIDTH_TO_SAVE_STR)) { 1324 return this.get Classic().getMinWidthToSave();1324 return this.getPrimary().getMinWidthToSave(); 1325 1325 } else { 1326 1326 return getMinWidth(); … … 1349 1349 public int getX() { 1350 1350 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.POSITION_STR)) { 1351 return this.get Classic().getX();1351 return this.getPrimary().getX(); 1352 1352 } else { 1353 1353 return Math.round(_x); … … 1362 1362 public int getY() { 1363 1363 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.POSITION_STR)) { 1364 return this.get Classic().getY();1364 return this.getPrimary().getY(); 1365 1365 } else { 1366 1366 return Math.round(_y); … … 1521 1521 if (isSurrogate()) { 1522 1522 surrogatePropertyInheritance.put(DefaultFrameWriter.TOOLTIP_STR, false); 1523 Item classic = getClassic();1523 Item primary = getPrimary(); 1524 1524 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.TOOLTIP_STR)) { 1525 classic.classicPropertyEncryption.put(DefaultFrameWriter.TOOLTIP_STR, EncryptionDetail.InheritanceCheckOnSave);1525 primary.primaryPropertyEncryption.put(DefaultFrameWriter.TOOLTIP_STR, EncryptionDetail.InheritanceCheckOnSave); 1526 1526 } 1527 1527 } … … 1530 1530 public List<String> getTooltip() { 1531 1531 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.TOOLTIP_STR)) { 1532 return this.get Classic().getTooltip();1532 return this.getPrimary().getTooltip(); 1533 1533 } else { 1534 1534 return _tooltip.asStringList(); … … 1825 1825 if (isSurrogate()) { 1826 1826 surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_STR, false); 1827 Item classic = getClassic();1827 Item primary = getPrimary(); 1828 1828 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_STR)) { 1829 classic.classicPropertyEncryption.put(DefaultFrameWriter.ACTION_STR, EncryptionDetail.InheritanceCheckOnSave);1829 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_STR, EncryptionDetail.InheritanceCheckOnSave); 1830 1830 } 1831 1831 } … … 1845 1845 if (isSurrogate()) { 1846 1846 surrogatePropertyInheritance.put(DefaultFrameWriter.DATA_STR, false); 1847 Item classic = getClassic();1847 Item primary = getPrimary(); 1848 1848 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DATA_STR)) { 1849 classic.classicPropertyEncryption.put(DefaultFrameWriter.DATA_STR, EncryptionDetail.InheritanceCheckOnSave);1849 primary.primaryPropertyEncryption.put(DefaultFrameWriter.DATA_STR, EncryptionDetail.InheritanceCheckOnSave); 1850 1850 } 1851 1851 } … … 1861 1861 if (isSurrogate()) { 1862 1862 surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_CURSOR_ENTER_STR, false); 1863 Item classic = getClassic();1863 Item primary = getPrimary(); 1864 1864 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_CURSOR_ENTER_STR)) { 1865 classic.classicPropertyEncryption.put(DefaultFrameWriter.ACTION_CURSOR_ENTER_STR, EncryptionDetail.InheritanceCheckOnSave);1865 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_CURSOR_ENTER_STR, EncryptionDetail.InheritanceCheckOnSave); 1866 1866 } 1867 1867 } … … 1873 1873 if (isSurrogate()) { 1874 1874 surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_CURSOR_LEAVE_STR, false); 1875 Item classic = getClassic();1875 Item primary = getPrimary(); 1876 1876 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_CURSOR_LEAVE_STR)) { 1877 classic.classicPropertyEncryption.put(DefaultFrameWriter.ACTION_CURSOR_LEAVE_STR, EncryptionDetail.InheritanceCheckOnSave);1877 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_CURSOR_LEAVE_STR, EncryptionDetail.InheritanceCheckOnSave); 1878 1878 } 1879 1879 } … … 1885 1885 if (isSurrogate()) { 1886 1886 surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_ENTER_FRAME_STR, false); 1887 Item classic = getClassic();1887 Item primary = getPrimary(); 1888 1888 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_ENTER_FRAME_STR)) { 1889 classic.classicPropertyEncryption.put(DefaultFrameWriter.ACTION_ENTER_FRAME_STR, EncryptionDetail.InheritanceCheckOnSave);1889 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_ENTER_FRAME_STR, EncryptionDetail.InheritanceCheckOnSave); 1890 1890 } 1891 1891 } … … 1897 1897 if (isSurrogate()) { 1898 1898 surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_LEAVE_FRAME_STR, false); 1899 Item classic = getClassic();1899 Item primary = getPrimary(); 1900 1900 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_LEAVE_FRAME_STR)) { 1901 classic.classicPropertyEncryption.put(DefaultFrameWriter.ACTION_LEAVE_FRAME_STR, EncryptionDetail.InheritanceCheckOnSave);1901 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_LEAVE_FRAME_STR, EncryptionDetail.InheritanceCheckOnSave); 1902 1902 } 1903 1903 } … … 1912 1912 if (isSurrogate()) { 1913 1913 surrogatePropertyInheritance.put(DefaultFrameWriter.ACTION_MARK_STR, false); 1914 Item classic = getClassic();1914 Item primary = getPrimary(); 1915 1915 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ACTION_MARK_STR)) { 1916 classic.classicPropertyEncryption.put(DefaultFrameWriter.ACTION_MARK_STR, EncryptionDetail.InheritanceCheckOnSave);1916 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ACTION_MARK_STR, EncryptionDetail.InheritanceCheckOnSave); 1917 1917 } 1918 1918 } … … 1945 1945 if (isSurrogate()) { 1946 1946 surrogatePropertyInheritance.put(DefaultFrameWriter.ARROW_STR, false); 1947 Item classic = getClassic();1947 Item primary = getPrimary(); 1948 1948 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ARROW_STR)) { 1949 classic.classicPropertyEncryption.put(DefaultFrameWriter.ARROW_STR, EncryptionDetail.InheritanceCheckOnSave);1949 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ARROW_STR, EncryptionDetail.InheritanceCheckOnSave); 1950 1950 } 1951 1951 } … … 1983 1983 if (isSurrogate()) { 1984 1984 surrogatePropertyInheritance.put(DefaultFrameWriter.BACKGROUND_COLOR_STR, false); 1985 Item classic = getClassic();1985 Item primary = getPrimary(); 1986 1986 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.BACKGROUND_COLOR_STR)) { 1987 classic.classicPropertyEncryption.put(DefaultFrameWriter.BACKGROUND_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave);1987 primary.primaryPropertyEncryption.put(DefaultFrameWriter.BACKGROUND_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave); 1988 1988 } 1989 1989 } … … 1998 1998 if (isSurrogate()) { 1999 1999 surrogatePropertyInheritance.put(DefaultFrameWriter.BORDER_COLOR_STR, false); 2000 Item classic = getClassic();2000 Item primary = getPrimary(); 2001 2001 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.BORDER_COLOR_STR)) { 2002 classic.classicPropertyEncryption.put(DefaultFrameWriter.BORDER_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave);2002 primary.primaryPropertyEncryption.put(DefaultFrameWriter.BORDER_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave); 2003 2003 } 2004 2004 } … … 2037 2037 if (isSurrogate()) { 2038 2038 surrogatePropertyInheritance.put(DefaultFrameWriter.CONSTRAINT_IDS_STR, false); 2039 Item classic = getClassic();2039 Item primary = getPrimary(); 2040 2040 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.CONSTRAINT_IDS_STR)) { 2041 classic.classicPropertyEncryption.put(DefaultFrameWriter.CONSTRAINT_IDS_STR, EncryptionDetail.InheritanceCheckOnSave);2041 primary.primaryPropertyEncryption.put(DefaultFrameWriter.CONSTRAINT_IDS_STR, EncryptionDetail.InheritanceCheckOnSave); 2042 2042 } 2043 2043 } … … 2066 2066 if (isSurrogate()) { 2067 2067 surrogatePropertyInheritance.put(DefaultFrameWriter.DATE_CREATED_STR, false); 2068 Item classic = getClassic();2068 Item primary = getPrimary(); 2069 2069 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.DATE_CREATED_STR)) { 2070 classic.classicPropertyEncryption.put(DefaultFrameWriter.DATE_CREATED_STR, EncryptionDetail.InheritanceCheckOnSave);2070 primary.primaryPropertyEncryption.put(DefaultFrameWriter.DATE_CREATED_STR, EncryptionDetail.InheritanceCheckOnSave); 2071 2071 } 2072 2072 } … … 2089 2089 if (isSurrogate()) { 2090 2090 surrogatePropertyInheritance.put(DefaultFrameWriter.FILL_COLOR_STR, false); 2091 Item classic = getClassic();2091 Item primary = getPrimary(); 2092 2092 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.FILL_COLOR_STR)) { 2093 classic.classicPropertyEncryption.put(DefaultFrameWriter.FILL_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave);2093 primary.primaryPropertyEncryption.put(DefaultFrameWriter.FILL_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave); 2094 2094 } 2095 2095 } … … 2110 2110 if (isSurrogate()) { 2111 2111 surrogatePropertyInheritance.put(DefaultFrameWriter.GRADIENT_COLOR_STR, false); 2112 Item classic = getClassic();2112 Item primary = getPrimary(); 2113 2113 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.GRADIENT_COLOR_STR)) { 2114 classic.classicPropertyEncryption.put(DefaultFrameWriter.GRADIENT_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave);2114 primary.primaryPropertyEncryption.put(DefaultFrameWriter.GRADIENT_COLOR_STR, EncryptionDetail.InheritanceCheckOnSave); 2115 2115 } 2116 2116 } … … 2119 2119 public Colour getGradientColor() { 2120 2120 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.GRADIENT_COLOR_STR)) { 2121 return this.get Classic().getGradientColor();2121 return this.getPrimary().getGradientColor(); 2122 2122 } else { 2123 2123 return _gradientColour; … … 2132 2132 if (isSurrogate()) { 2133 2133 surrogatePropertyInheritance.put(DefaultFrameWriter.FILL_PATTERN_STR, false); 2134 Item classic = getClassic();2134 Item primary = getPrimary(); 2135 2135 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.FILL_PATTERN_STR)) { 2136 classic.classicPropertyEncryption.put(DefaultFrameWriter.FILL_PATTERN_STR, EncryptionDetail.InheritanceCheckOnSave);2136 primary.primaryPropertyEncryption.put(DefaultFrameWriter.FILL_PATTERN_STR, EncryptionDetail.InheritanceCheckOnSave); 2137 2137 } 2138 2138 } … … 2154 2154 if (isSurrogate()) { 2155 2155 surrogatePropertyInheritance.put(DefaultFrameWriter.HIGHLIGHT_STR, false); 2156 Item classic = getClassic();2156 Item primary = getPrimary(); 2157 2157 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.HIGHLIGHT_STR)) { 2158 classic.classicPropertyEncryption.put(DefaultFrameWriter.HIGHLIGHT_STR, EncryptionDetail.InheritanceCheckOnSave);2158 primary.primaryPropertyEncryption.put(DefaultFrameWriter.HIGHLIGHT_STR, EncryptionDetail.InheritanceCheckOnSave); 2159 2159 } 2160 2160 } … … 2173 2173 if (isSurrogate()) { 2174 2174 surrogatePropertyInheritance.put(DefaultFrameWriter.TYPE_AND_ID_STR, false); 2175 Item classic = getClassic();2175 Item primary = getPrimary(); 2176 2176 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.TYPE_AND_ID_STR)) { 2177 classic.classicPropertyEncryption.put(DefaultFrameWriter.TYPE_AND_ID_STR, EncryptionDetail.InheritanceCheckOnSave);2177 primary.primaryPropertyEncryption.put(DefaultFrameWriter.TYPE_AND_ID_STR, EncryptionDetail.InheritanceCheckOnSave); 2178 2178 } 2179 2179 } … … 2189 2189 if (isSurrogate()) { 2190 2190 surrogatePropertyInheritance.put(DefaultFrameWriter.LINE_IDS_STR, false); 2191 Item classic = getClassic();2191 Item primary = getPrimary(); 2192 2192 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINE_IDS_STR)) { 2193 classic.classicPropertyEncryption.put(DefaultFrameWriter.LINE_IDS_STR, EncryptionDetail.InheritanceCheckOnSave);2193 primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINE_IDS_STR, EncryptionDetail.InheritanceCheckOnSave); 2194 2194 } 2195 2195 } … … 2204 2204 if (isSurrogate()) { 2205 2205 surrogatePropertyInheritance.put(DefaultFrameWriter.LINE_PATTERN_STR, false); 2206 Item classic = getClassic();2206 Item primary = getPrimary(); 2207 2207 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINE_PATTERN_STR)) { 2208 classic.classicPropertyEncryption.put(DefaultFrameWriter.LINE_PATTERN_STR, EncryptionDetail.InheritanceCheckOnSave);2208 primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINE_PATTERN_STR, EncryptionDetail.InheritanceCheckOnSave); 2209 2209 } 2210 2210 } … … 2244 2244 if (isSurrogate()) { 2245 2245 surrogatePropertyInheritance.put(DefaultFrameWriter.LINK_STR, false); 2246 Item classic = getClassic();2246 Item primary = getPrimary(); 2247 2247 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINK_STR)) { 2248 classic.classicPropertyEncryption.put(DefaultFrameWriter.LINK_STR, EncryptionDetail.InheritanceCheckOnSave);2248 primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_STR, EncryptionDetail.InheritanceCheckOnSave); 2249 2249 } 2250 2250 } … … 2256 2256 if (isSurrogate()) { 2257 2257 surrogatePropertyInheritance.put(DefaultFrameWriter.LINK_HISTORY_STR, false); 2258 Item classic = getClassic();2258 Item primary = getPrimary(); 2259 2259 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINK_HISTORY_STR)) { 2260 classic.classicPropertyEncryption.put(DefaultFrameWriter.LINK_HISTORY_STR, EncryptionDetail.InheritanceCheckOnSave);2260 primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_HISTORY_STR, EncryptionDetail.InheritanceCheckOnSave); 2261 2261 } 2262 2262 } … … 2265 2265 public boolean getLinkHistory() { 2266 2266 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.LINK_HISTORY_STR)) { 2267 return this.get Classic().getLinkHistory();2267 return this.getPrimary().getLinkHistory(); 2268 2268 } else { 2269 2269 return _linkHistory; … … 2282 2282 if (isSurrogate()) { 2283 2283 surrogatePropertyInheritance.put(DefaultFrameWriter.LINK_FRAMESET_STR, false); 2284 Item classic = getClassic();2284 Item primary = getPrimary(); 2285 2285 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINK_FRAMESET_STR)) { 2286 classic.classicPropertyEncryption.put(DefaultFrameWriter.LINK_FRAMESET_STR, EncryptionDetail.InheritanceCheckOnSave);2286 primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_FRAMESET_STR, EncryptionDetail.InheritanceCheckOnSave); 2287 2287 } 2288 2288 } … … 2297 2297 if (isSurrogate()) { 2298 2298 surrogatePropertyInheritance.put(DefaultFrameWriter.LINK_MARK_STR, false); 2299 Item classic = getClassic();2299 Item primary = getPrimary(); 2300 2300 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINK_MARK_STR)) { 2301 classic.classicPropertyEncryption.put(DefaultFrameWriter.LINK_MARK_STR, EncryptionDetail.InheritanceCheckOnSave);2301 primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_MARK_STR, EncryptionDetail.InheritanceCheckOnSave); 2302 2302 } 2303 2303 } … … 2314 2314 if (isSurrogate()) { 2315 2315 surrogatePropertyInheritance.put(DefaultFrameWriter.LINK_TEMPLATE_STR, false); 2316 Item classic = getClassic();2316 Item primary = getPrimary(); 2317 2317 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LINK_TEMPLATE_STR)) { 2318 classic.classicPropertyEncryption.put(DefaultFrameWriter.LINK_TEMPLATE_STR, EncryptionDetail.InheritanceCheckOnSave);2318 primary.primaryPropertyEncryption.put(DefaultFrameWriter.LINK_TEMPLATE_STR, EncryptionDetail.InheritanceCheckOnSave); 2319 2319 } 2320 2320 } … … 2348 2348 if (isSurrogate()) { 2349 2349 surrogatePropertyInheritance.put(DefaultFrameWriter.OWNER_STR, false); 2350 Item classic = getClassic();2350 Item primary = getPrimary(); 2351 2351 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.OWNER_STR)) { 2352 classic.classicPropertyEncryption.put(DefaultFrameWriter.OWNER_STR, EncryptionDetail.InheritanceCheckOnSave);2352 primary.primaryPropertyEncryption.put(DefaultFrameWriter.OWNER_STR, EncryptionDetail.InheritanceCheckOnSave); 2353 2353 } 2354 2354 } … … 2539 2539 if (isSurrogate()) { 2540 2540 surrogatePropertyInheritance.put(DefaultFrameWriter.POSITION_STR, false); 2541 Item classic = getClassic();2541 Item primary = getPrimary(); 2542 2542 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.POSITION_STR)) { 2543 classic.classicPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave);2543 primary.primaryPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave); 2544 2544 } 2545 2545 } … … 2583 2583 if (isSurrogate()) { 2584 2584 surrogatePropertyInheritance.put(DefaultFrameWriter.THICKNESS_STR, false); 2585 Item classic = getClassic();2585 Item primary = getPrimary(); 2586 2586 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.THICKNESS_STR)) { 2587 classic.classicPropertyEncryption.put(DefaultFrameWriter.THICKNESS_STR, EncryptionDetail.InheritanceCheckOnSave);2587 primary.primaryPropertyEncryption.put(DefaultFrameWriter.THICKNESS_STR, EncryptionDetail.InheritanceCheckOnSave); 2588 2588 } 2589 2589 } … … 2641 2641 public float getThickness() { 2642 2642 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.THICKNESS_STR)) { 2643 return this.get Classic().getThickness();2643 return this.getPrimary().getThickness(); 2644 2644 } else { 2645 2645 return _thickness; … … 2695 2695 if (isSurrogate()) { 2696 2696 surrogatePropertyInheritance.put(DefaultFrameWriter.POSITION_STR, false); 2697 Item classic = getClassic();2697 Item primary = getPrimary(); 2698 2698 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.POSITION_STR)) { 2699 classic.classicPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave);2699 primary.primaryPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave); 2700 2700 } 2701 2701 } … … 2713 2713 if (isSurrogate()) { 2714 2714 surrogatePropertyInheritance.put(DefaultFrameWriter.POSITION_STR, false); 2715 Item classic = getClassic();2715 Item primary = getPrimary(); 2716 2716 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.POSITION_STR)) { 2717 classic.classicPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave);2717 primary.primaryPropertyEncryption.put(DefaultFrameWriter.POSITION_STR, EncryptionDetail.InheritanceCheckOnSave); 2718 2718 } 2719 2719 } … … 3525 3525 if (isSurrogate()) { 3526 3526 surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_LEFT_STR, false); 3527 Item classic = getClassic();3527 Item primary = getPrimary(); 3528 3528 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_LEFT_STR)) { 3529 classic.classicPropertyEncryption.put(DefaultFrameWriter.ANCHOR_LEFT_STR, EncryptionDetail.InheritanceCheckOnSave);3529 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_LEFT_STR, EncryptionDetail.InheritanceCheckOnSave); 3530 3530 } 3531 3531 } … … 3541 3541 if (isSurrogate()) { 3542 3542 surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_RIGHT_STR, false); 3543 Item classic = getClassic();3543 Item primary = getPrimary(); 3544 3544 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_RIGHT_STR)) { 3545 classic.classicPropertyEncryption.put(DefaultFrameWriter.ANCHOR_RIGHT_STR, EncryptionDetail.InheritanceCheckOnSave);3545 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_RIGHT_STR, EncryptionDetail.InheritanceCheckOnSave); 3546 3546 } 3547 3547 } … … 3557 3557 if (isSurrogate()) { 3558 3558 surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_TOP_STR, false); 3559 Item classic = getClassic();3559 Item primary = getPrimary(); 3560 3560 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_TOP_STR)) { 3561 classic.classicPropertyEncryption.put(DefaultFrameWriter.ANCHOR_TOP_STR, EncryptionDetail.InheritanceCheckOnSave);3561 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_TOP_STR, EncryptionDetail.InheritanceCheckOnSave); 3562 3562 } 3563 3563 } … … 3574 3574 if (isSurrogate()) { 3575 3575 surrogatePropertyInheritance.put(DefaultFrameWriter.ANCHOR_BOTTOM_STR, false); 3576 Item classic = getClassic();3576 Item primary = getPrimary(); 3577 3577 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_BOTTOM_STR)) { 3578 classic.classicPropertyEncryption.put(DefaultFrameWriter.ANCHOR_BOTTOM_STR, EncryptionDetail.InheritanceCheckOnSave);3578 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_BOTTOM_STR, EncryptionDetail.InheritanceCheckOnSave); 3579 3579 } 3580 3580 } … … 3596 3596 public Integer getAnchorLeft() { 3597 3597 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ANCHOR_LEFT_STR)) { 3598 return this.get Classic().getAnchorLeft();3598 return this.getPrimary().getAnchorLeft(); 3599 3599 } else { 3600 3600 return _anchoring.getLeftAnchor(); … … 3604 3604 public Integer getAnchorRight() { 3605 3605 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ANCHOR_RIGHT_STR)) { 3606 return this.get Classic().getAnchorRight();3606 return this.getPrimary().getAnchorRight(); 3607 3607 } else { 3608 3608 return _anchoring.getRightAnchor(); … … 3612 3612 public Integer getAnchorTop() { 3613 3613 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ANCHOR_TOP_STR)) { 3614 return this.get Classic().getAnchorTop();3614 return this.getPrimary().getAnchorTop(); 3615 3615 } else { 3616 3616 return _anchoring.getTopAnchor(); … … 3620 3620 public Integer getAnchorBottom() { 3621 3621 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ANCHOR_BOTTOM_STR)) { 3622 return this.get Classic().getAnchorBottom();3622 return this.getPrimary().getAnchorBottom(); 3623 3623 } else { 3624 3624 return _anchoring.getBottomAnchor(); … … 3628 3628 public String getText() { 3629 3629 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.TEXT_STR)) { 3630 return this.get Classic().getText();3630 return this.getPrimary().getText(); 3631 3631 } else { 3632 3632 return "@" + getClass().getSimpleName() + ":" + getID(); … … 3868 3868 public int getMagnetizedItemLeft() { 3869 3869 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT_STR)) { 3870 return this.get Classic().getMagnetizedItemLeft();3870 return this.getPrimary().getMagnetizedItemLeft(); 3871 3871 } else { 3872 3872 if(_magnetizedItemLeft != null) return _magnetizedItemLeft.getID(); … … 3884 3884 if (isSurrogate()) { 3885 3885 surrogatePropertyInheritance.put(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT_STR, false); 3886 Item classic = getClassic();3886 Item primary = getPrimary(); 3887 3887 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT_STR)) { 3888 classic.classicPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT_STR, EncryptionDetail.InheritanceCheckOnSave);3888 primary.primaryPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_LEFT_STR, EncryptionDetail.InheritanceCheckOnSave); 3889 3889 } 3890 3890 } … … 3893 3893 public int getMagnetizedItemRight() { 3894 3894 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT_STR)) { 3895 return this.get Classic().getMagnetizedItemRight();3895 return this.getPrimary().getMagnetizedItemRight(); 3896 3896 } else { 3897 3897 if(_magnetizedItemRight != null) return _magnetizedItemRight.getID(); … … 3909 3909 if (isSurrogate()) { 3910 3910 surrogatePropertyInheritance.put(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT_STR, false); 3911 Item classic = getClassic();3911 Item primary = getPrimary(); 3912 3912 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT_STR)) { 3913 classic.classicPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT_STR, EncryptionDetail.InheritanceCheckOnSave);3913 primary.primaryPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_RIGHT_STR, EncryptionDetail.InheritanceCheckOnSave); 3914 3914 } 3915 3915 } … … 3918 3918 public int getMagnetizedItemTop() { 3919 3919 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MAGNETIZED_ITEM_TOP_STR)) { 3920 return this.get Classic().getMagnetizedItemTop();3920 return this.getPrimary().getMagnetizedItemTop(); 3921 3921 } else { 3922 3922 if(_magnetizedItemTop != null) return _magnetizedItemTop.getID(); … … 3934 3934 if (isSurrogate()) { 3935 3935 surrogatePropertyInheritance.put(DefaultFrameWriter.MAGNETIZED_ITEM_TOP_STR, false); 3936 Item classic = getClassic();3936 Item primary = getPrimary(); 3937 3937 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.MAGNETIZED_ITEM_TOP_STR)) { 3938 classic.classicPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_TOP_STR, EncryptionDetail.InheritanceCheckOnSave);3938 primary.primaryPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_TOP_STR, EncryptionDetail.InheritanceCheckOnSave); 3939 3939 } 3940 3940 } … … 3943 3943 public int getMagnetizedItemBottom() { 3944 3944 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM_STR)) { 3945 return this.get Classic().getMagnetizedItemBottom();3945 return this.getPrimary().getMagnetizedItemBottom(); 3946 3946 } else { 3947 3947 if(_magnetizedItemBottom != null) return _magnetizedItemBottom.getID(); … … 3959 3959 if (isSurrogate()) { 3960 3960 surrogatePropertyInheritance.put(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM_STR, false); 3961 Item classic = getClassic();3961 Item primary = getPrimary(); 3962 3962 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM_STR)) { 3963 classic.classicPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM_STR, EncryptionDetail.InheritanceCheckOnSave);3963 primary.primaryPropertyEncryption.put(DefaultFrameWriter.MAGNETIZED_ITEM_BOTTOM_STR, EncryptionDetail.InheritanceCheckOnSave); 3964 3964 } 3965 3965 } … … 3968 3968 public String getEncryptionLabel() { 3969 3969 if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.ENCRYPTION_LABEL_STR)) { 3970 return this.get Classic().getEncryptionLabel();3970 return this.getPrimary().getEncryptionLabel(); 3971 3971 } else { 3972 3972 return _encryptionLabel; … … 3976 3976 public void setEncryptionLabel(String label) { 3977 3977 this._encryptionLabel = label; 3978 if (this.getSurrogates().isEmpty()) { 3979 Item copy = this.copy(); 3980 if (copy instanceof Text) { copy.setText("Encrypted"); } 3981 this.addToSurrogates(copy); 3982 } 3983 3984 3985 3986 for (Character tag: DefaultFrameWriter.getItemTags().keySet()) { 3987 if (tag == 'S') { 3988 classicPropertyEncryption.put(tag + "", EncryptionDetail.UnencryptedOnSave); 3989 } else { 3990 classicPropertyEncryption.put(tag + "", EncryptionDetail.ReencryptOnSave); 3991 } 3992 3993 for (Item surrogate: this.getSurrogates()) { 3994 if (tag == 'T') { 3995 surrogate.surrogatePropertyInheritance.put(tag + "", false); 3996 } else { 3997 surrogate.surrogatePropertyInheritance.put(tag + "", true); 3998 } 3999 } 4000 } 4001 4002 for (String tag: DefaultFrameWriter.getItemTagsExt().keySet()) { 4003 if (tag == "_el") { 4004 classicPropertyEncryption.put(tag, EncryptionDetail.UnencryptedOnSave); 4005 } else { 4006 classicPropertyEncryption.put(tag, EncryptionDetail.ReencryptOnSave); 4007 } 4008 4009 for (Item surrogate: this.getSurrogates()) { 4010 surrogate.surrogatePropertyInheritance.put(tag + "", true); 4011 } 4012 } 4013 4014 /* if (isSurrogate()) { 4015 surrogatePropertyInheritance.put(DefaultFrameWriter.ENCRYPTION_LABEL_STR, false); 4016 Item classic = getClassic(); 4017 if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ENCRYPTION_LABEL_STR)) { 4018 classic.classicPropertyEncryption.put(DefaultFrameWriter.ENCRYPTION_LABEL_STR, EncryptionDetail.InheritanceCheckOnSave); 4019 } 4020 }*/ 4021 } 4022 4023 public void setEncryptionLabelOnLoad(String label) { 4024 this._encryptionLabel = label; 4025 4026 for (Character tag: DefaultFrameWriter.getItemTags().keySet()) { 4027 if (tag == 'S') { 4028 classicPropertyEncryption.put(tag + "", EncryptionDetail.UnencryptedOnSave); 4029 } else { 4030 classicPropertyEncryption.put(tag + "", EncryptionDetail.ReencryptOnSave); 4031 } 4032 } 4033 4034 for (String tag: DefaultFrameWriter.getItemTagsExt().keySet()) { 4035 if (tag == "_el") { 4036 classicPropertyEncryption.put(tag, EncryptionDetail.UnencryptedOnSave); 4037 } else { 4038 classicPropertyEncryption.put(tag, EncryptionDetail.ReencryptOnSave); 4039 } 4040 } 3978 this.getSurrogates().clear(); 3979 Item copy = this.copy(); 3980 if (copy instanceof Text) { copy.setText("Encrypted"); } 3981 this.addToSurrogates(copy); 4041 3982 } 4042 3983 … … 4096 4037 } 4097 4038 4098 private void setAsSurrogateFor(Item classic) {4099 this.surrogateFor = classic;4039 private void setAsSurrogateFor(Item primary) { 4040 this.surrogateFor = primary; 4100 4041 } 4101 4042 … … 4103 4044 this.surrogateItems.add(surrogate); 4104 4045 surrogate.setAsSurrogateFor(this); 4046 4047 for (Character tag: DefaultFrameWriter.getItemTags().keySet()) { 4048 if (tag == 'T') { 4049 primaryPropertyEncryption.put(tag + "", EncryptionDetail.ReencryptOnSave); 4050 } else { 4051 primaryPropertyEncryption.put(tag + "", EncryptionDetail.UnencryptedOnSave); 4052 } 4053 4054 if (tag == 'T' || tag == 'S') { 4055 surrogate.surrogatePropertyInheritance.put(tag + "", false); 4056 } else { 4057 surrogate.surrogatePropertyInheritance.put(tag + "", true); 4058 } 4059 } 4060 4061 for (String tag: DefaultFrameWriter.getItemTagsExt().keySet()) { 4062 primaryPropertyEncryption.put(tag, EncryptionDetail.UnencryptedOnSave); 4063 surrogate.surrogatePropertyInheritance.put(tag + "", true); 4064 } 4105 4065 } 4106 4066 … … 4109 4069 } 4110 4070 4111 public Item get Classic() {4071 public Item getPrimary() { 4112 4072 return this.surrogateFor; 4113 4073 } 4114 4074 4115 4075 public EncryptionDetail getEncryptionDetailForTag(String tag) { 4116 EncryptionDetail encryptionDetail = classicPropertyEncryption.get(tag);4076 EncryptionDetail encryptionDetail = primaryPropertyEncryption.get(tag); 4117 4077 4118 4078 if (encryptionDetail == null) { … … 4124 4084 4125 4085 public void setEncryptionDetailForTag(String tag, EncryptionDetail encryptionDetail) { 4126 classicPropertyEncryption.put(tag, encryptionDetail);4086 primaryPropertyEncryption.put(tag, encryptionDetail); 4127 4087 } 4128 4088 … … 4133 4093 4134 4094 /** 4135 * If when setting a property, we find that the classichas a undeciphered value, when we must containue using that undeciphered value4095 * If when setting a property, we find that the primary has a undeciphered value, when we must containue using that undeciphered value 4136 4096 * when eventually saving. 4137 4097 * @return 4138 4098 */ 4139 4099 protected boolean subjectToInheritanceCheckOnSave(String tag) { 4140 if (get Classic() == null) return false;4141 return get Classic().classicPropertyEncryption.get(tag) != EncryptionDetail.UseUndecipheredValueOnSave;4100 if (getPrimary() == null) return false; 4101 return getPrimary().primaryPropertyEncryption.get(tag) != EncryptionDetail.UseUndecipheredValueOnSave; 4142 4102 } 4143 4103 }
Note:
See TracChangeset
for help on using the changeset viewer.