private List<ObjectAction> getFlattenedActions(final List<ObjectAction> objectActions, final ActionType type) {
final List<ObjectAction> actions = Lists.newArrayList();
for (final ObjectAction action : objectActions) {
if (action.getType().isSet()) {
final ObjectActionSet actionSet = (ObjectActionSet) action;
final List<ObjectAction> subActions = actionSet.getActions();
for (final ObjectAction subAction : subActions) {
if (type.matchesTypeOf(subAction)) {
actions.add(subAction);
}
}