Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-7606

Provide a way for Repository Exception free JCR operations

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.2
    • None
    • None
    • None
    • UI Framework 4, UI Framework 11
    • 2

      We do have utilities to work with JCR such as NodeUtil or PropertyUtil.
      These are quite hard to use inside of Streams/Optionals because of checked exceptions they throw.
      The usual solution so far is extraction the calls to a method:

      Optional.of(Node).map(getName());
      
      String getName(Node node) {
        try {
           return node.getName();
        } catch (RE e) {
          throw new RuntimeRepositoryException(e);
        }
      }
      

      As result, such methods are duplicated all over the place.
      The goal of this ticket would be introduce a utitility which would do the exception handling itself.

        Acceptance criteria

              rkovarik Roman Kovařík
              rkovarik Roman Kovařík
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 1d 52m
                    1d 52m