Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
                     while (st.hasMoreTokens()) {
                        final String token = st.nextToken();
                        final CommandType listType = annotation.collectionType();
                        switch (listType) {
                            case INTEGER:
                                listParam.add(Integer.valueOf(token));
                                break;
                            case UUID:
                                if (token.isEmpty())
                                    break;
                                final Long internalId = translateUuidToInternalId(token, annotation);
                                listParam.add(internalId);
                                break;
                            case LONG: {
                                listParam.add(Long.valueOf(token));
                            }
                                break;
                            case SHORT:
                                listParam.add(Short.valueOf(token));
                            case STRING:
                                listParam.add(token);
                                break;
                        }
                    }
                    field.set(cmdObj, listParam);
                    break;
                case UUID:
                    if (paramObj.toString().isEmpty())
                        break;
                    final Long internalId = translateUuidToInternalId(paramObj.toString(), annotation);
                    field.set(cmdObj, internalId);
                    break;

Detailed error messages in events

In case of events logged due to an error occurred while processing a job or change of state of a resource , a detailed error message describing the reason of failure would be logged into the error_message field of the event. Based on who the user is an admin or a normal user relevant error message would be shown to the end user.

Externalize the event descriptions strings

The event descriptions are currently hard coded in the java files. These strings could be externalize to a resource bundle like in a message.properties file, and can be processed in the event interceptors before an event is logged.