Implement the new Resources app (MGNLRES-140)

[MGNLRES-159] Adjust availability of edit/hotfix actions Created: 28/May/15  Updated: 07/Jun/15  Resolved: 02/Jun/15

Status: Closed
Project: Magnolia Resources Module
Component/s: app
Affects Version/s: None
Fix Version/s: 2.4

Type: Sub-task Priority: Major
Reporter: Ilgun Ilgun Assignee: Ilgun Ilgun
Resolution: Fixed Votes: 0
Labels: platform-cell
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Date of First Response:
Sprint: 5.4 Sprint 4
Team: Nucleus

 Description   

Hotfix action should not be available for anything rather than files and given file should be not present in JCR



 Comments   
Comment by Aleksandr Pchelintcev [ 01/Jun/15 ]
  • IsAbsentInJcrRule's name seems to be conflicting w/ JavaDoc and the implementation:
    • The rule seems to be testing whether the item is actually not absent in JCR.
  • IsFileRule (as well as previously mentioned rule) also raise some doubts in my mind:
    • So according to the implementation true can only be returned if the passed object is a LayeredResourcePath, but what if that's just a plain FileResourcePath (or JCR analogue)?
  • Names of the rules do not reflect the relation to the resources (i.e. could named ~IsFileResource), wdyt?
  • Finally if you add code snippets in JavaDoc (e.g. "...rule returns true...") - could you pls use either <code> tag or (better) {@code ...}

    .

Comment by Ilgun Ilgun [ 02/Jun/15 ]
  • Fixed the Javadoc, sorry for that. I wanted to implement it differently initially.
  • I made some renaming in the tests for both rules regarding this, it should be clearer now. Basically I moved these rules into resources app module, so that these rules are just should be used for resources app, thus, we just expect to have LayeredResourcePath at that time. If not it returns false in anyways.
  • Changed the names as well, should be better now.
  • Fixed that as well, thanks for the info.
Generated at Mon Feb 12 06:47:58 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.