if (notContributed != null && notContributed.toActions()) {
// skip if is an action that has been annotated to not be contributed
return;
}
Builder subMenuItemBuilder = null;
final ObjectAdapterMemento targetAdapterMemento = adapterMemento; // determineAdapterFor(action);
if(targetAdapterMemento != null) {
// against an entity or a service (if a contributed action)
subMenuItemBuilder = parent.newSubMenuItem(targetAdapterMemento, action, cssMenuLinkFactory, actionPromptModalWindowProvider);
} else {
if (action.containsDoOpFacet(BulkFacet.class)) {
// ignore fact have no target action;
// we expect that the link factory is able to handle this
// (ie will iterate through all objects from a list and invoke in bulk)
subMenuItemBuilder = parent.newSubMenuItem(action, cssMenuLinkFactory, actionPromptModalWindowProvider);
}
}
if (subMenuItemBuilder != null) {
subMenuItemBuilder.build();
}
}