private InteractionResultSet isProposedArgumentSetValidResultSet(final ObjectAdapter object,
final ObjectAdapter[] proposedArguments) {
final InteractionInvocationMethod invocationMethod = InteractionInvocationMethod.BY_USER;
final InteractionResultSet resultSet = new InteractionResultSet();
final List<ObjectActionParameter> actionParameters = getParameters();
if (proposedArguments != null) {
// TODO: doesn't seem to be used...
// ObjectAdapter[] params = realParameters(object, proposedArguments);
for (int i = 0; i < proposedArguments.length; i++) {
final ValidityContext<?> ic =
actionParameters.get(i).createProposedArgumentInteractionContext(getAuthenticationSession(),
invocationMethod, object, proposedArguments, i);
InteractionUtils.isValidResultSet(getParameter(i), ic, resultSet);
}
}
// only check the action's own validity if all the arguments are OK.
if (resultSet.isAllowed()) {
final ValidityContext<?> ic =
createActionInvocationInteractionContext(getAuthenticationSession(), invocationMethod, object,
proposedArguments);
InteractionUtils.isValidResultSet(this, ic, resultSet);
}