[MGNLUI-6273] DOC: Document available types of dropConstraint Created: 29/Sep/20  Updated: 06/Oct/20  Resolved: 06/Oct/20

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 6.2
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Chris Jennings Assignee: Ashraf Khamis
Resolution: Done Votes: 0
Labels: content-app, new-UI-framework
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Epic Link: UI framework implementation
Sprint: UI FW 12
Story Points: 1

 Description   

dropConstraint is mentioned in the Content view definition page but no information is provided on the different types available. Instead, one must read the dev comments on Javadocs.

Can these options please be listed with a summary of the available options?



 Comments   
Comment by Ashraf Khamis [ 06/Oct/20 ]

Added the following to the dropConstraint property at https://documentation.magnolia-cms.com/display/DOCS62/Content+view+definition:

dropConstraint

optional (used only in tree and list views), default is no drag-and-drop capability

Defines acceptance criteria for move operations. By restricting the nodes that a user can move, you can enforce a certain node hierarchy. For example, you might want to allow moving content under folders but not folders under content. If no value is defined, the view will have no drag-and-drop capability. Possible values are:

  • alwaysTrueDropConstraint: basic implementation of DropConstraint that always returns true.
  • jcrDropConstraintDropConstraint for JCR content apps that returns true based on the defined primaryNodeType.

When you write your own class, implement the info.magnolia.ui.contentapp.browser.drop.DropConstraint interface.

All the other implementing classes listed under DropConstraint are either deprecated or abstract base classes.

Reviewed by Roman.

Generated at Mon Feb 12 09:34:50 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.