Jetspeed 2
  1. Jetspeed 2
  2. JS2-1019

Several import/export mapping bugs in the JetspeedSerializer implementations

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.0
    • Component/s: Import/Export
    • Labels:
      None

      Activity

      Hide
      Ate Douma added a comment -

      I committed a bunch of fixed and improvements to the JetspeedSerializer implementations and the used OM mapping.
      Most importantly: now it actually is possible to import/export custom JetspeedPrincipal extension, while before only one extension was "supported", else it would crash.

      Additionally, I've added a major optimization to the xml format of SecurityAttributes and Preferences.
      The old-style format still is supported on import but on export only the new format is (now) used.

      Example of the old-style format for SecurityAttributes (note: Jetspeed-2.1.3 didn't even have SecurityAttributes yet):

      <SecurityAttributes>
      <SecurityAttribute readonly='false'>
      <name value="org.apache.jetspeed.profiler.refreshUserHomepage"/>
      <value value="true"/>
      </SecurityAttribute>
      </SecurityAttributes>
      <userinfo>
      <preference>
      <name value="user.name.given"/>
      <value value="Dev"/>
      </preference>
      <preference>
      <name value="user.name.family"/>
      <value value="Manager"/>
      </preference>
      </userinfo>

      Same data in the new format:

      <SecurityAttributes>
      <SecurityAttribute readonly="false" datatype="STRING" registered="true" required="false" category="info" name="user.name.family" value="Manager"/>
      <SecurityAttribute readonly="false" datatype="STRING" registered="true" required="false" category="info" name="user.name.given" value="Dev"/>
      <SecurityAttribute readonly="false" datatype="STRING" registered="true" required="false" category="jetspeed" name="org.apache.jetspeed.profiler.refreshUserHomepage" value="true"/>
      </SecurityAttributes>

      Same kind of format is now used for preferences, and if a preference is multivalued, multiple child <value/> elements (like before) will be written instead of the value attribute.

      Show
      Ate Douma added a comment - I committed a bunch of fixed and improvements to the JetspeedSerializer implementations and the used OM mapping. Most importantly: now it actually is possible to import/export custom JetspeedPrincipal extension, while before only one extension was "supported", else it would crash. Additionally, I've added a major optimization to the xml format of SecurityAttributes and Preferences. The old-style format still is supported on import but on export only the new format is (now) used. Example of the old-style format for SecurityAttributes (note: Jetspeed-2.1.3 didn't even have SecurityAttributes yet): <SecurityAttributes> <SecurityAttribute readonly='false'> <name value="org.apache.jetspeed.profiler.refreshUserHomepage"/> <value value="true"/> </SecurityAttribute> </SecurityAttributes> <userinfo> <preference> <name value="user.name.given"/> <value value="Dev"/> </preference> <preference> <name value="user.name.family"/> <value value="Manager"/> </preference> </userinfo> Same data in the new format: <SecurityAttributes> <SecurityAttribute readonly="false" datatype="STRING" registered="true" required="false" category="info" name="user.name.family" value="Manager"/> <SecurityAttribute readonly="false" datatype="STRING" registered="true" required="false" category="info" name="user.name.given" value="Dev"/> <SecurityAttribute readonly="false" datatype="STRING" registered="true" required="false" category="jetspeed" name="org.apache.jetspeed.profiler.refreshUserHomepage" value="true"/> </SecurityAttributes> Same kind of format is now used for preferences, and if a preference is multivalued, multiple child <value/> elements (like before) will be written instead of the value attribute.

        People

        • Assignee:
          Unassigned
          Reporter:
          Ate Douma
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development