@Override public void applyToLink(ModelActionRole type, ModelAction<?> action) { if (!getPath().isDirectChild(action.getSubject().getPath())) { throw new IllegalArgumentException( String.format( "Linked element action reference has a path (%s) which is not a child of this node (%s).", action.getSubject().getPath(), getPath())); } modelRegistry.bind(action.getSubject(), type, action, ModelPath.ROOT); }
@Override public void applyToSelf(ModelActionRole role, ModelAction<?> action) { DefaultModelRegistry.checkNodePath(this, action); modelRegistry.bind(action.getSubject(), role, action, ModelPath.ROOT); }