Example #1
0
 @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);
 }
Example #2
0
 @Override
 public void applyToSelf(ModelActionRole role, ModelAction<?> action) {
   DefaultModelRegistry.checkNodePath(this, action);
   modelRegistry.bind(action.getSubject(), role, action, ModelPath.ROOT);
 }