Skip to content

Commit

Permalink
Improve extendability of NodeTypeConstraintAwareDropConstraint & Node…
Browse files Browse the repository at this point in the history
…TypeConstraintAwareJcrContentClipboard
  • Loading branch information
eschleb committed Feb 16, 2024
1 parent 7126e29 commit 47de295
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public boolean allowedToMove(final com.vaadin.v7.data.Item sourceItem) {
return true;
}

private boolean allowedAsChild(final Node src, final Node dst) {
protected boolean allowedAsChild(final Node src, final Node dst) {
try {
if(Objects.equals(src.getSession().getWorkspace().getName(), dst.getSession().getWorkspace().getName())) {
for (NodeDefinition allowedChildNodeDefinition : dst.getPrimaryNodeType().getChildNodeDefinitions()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ protected boolean canPasteInto(final JcrItemId source, final JcrItemId destinati
return false;
}

private boolean canPasteInto(final Property source, final Node destination) throws RepositoryException {
protected boolean canPasteInto(final Property source, final Node destination) throws RepositoryException {
if (source.isMultiple()) {
return destination.getPrimaryNodeType().canSetProperty(source.getName(), source.getValues());
}
return destination.getPrimaryNodeType().canSetProperty(source.getName(), source.getValue());
}

private boolean canPasteInto(final Node source, final Node destination) throws RepositoryException {
protected boolean canPasteInto(final Node source, final Node destination) throws RepositoryException {
for (NodeDefinition allowedChildNodeDefinition : destination.getPrimaryNodeType().getChildNodeDefinitions()) {
for (NodeType allowedChildRequiredPrimaryType : allowedChildNodeDefinition.getRequiredPrimaryTypes()) {
if (Objects.equals(source.getPrimaryNodeType(), allowedChildRequiredPrimaryType)) {
Expand Down

0 comments on commit 47de295

Please sign in to comment.