Fix PMD errors in REST API framework

Also refactored error catalog to get rid of a useless wrapper
class.

Change-Id: I0d4b190703b85cdea91da00e7f238538e7c115ec
diff --git a/src/main/java/net/onrc/onos/api/rest/RestError.java b/src/main/java/net/onrc/onos/api/rest/RestError.java
index dd61d26..548e3e5 100644
--- a/src/main/java/net/onrc/onos/api/rest/RestError.java
+++ b/src/main/java/net/onrc/onos/api/rest/RestError.java
@@ -8,7 +8,7 @@
  */
 public final class RestError {
 
-    private final RestErrorCodes.RestErrorCode code;
+    private final RestErrorCode code;
     private final String summary;
     private final String formattedDescription;
 
@@ -18,7 +18,7 @@
     private RestError() {
         // This is never called, but Java requires these initializations
         // because the members are final.
-        code = RestErrorCodes.RestErrorCode.INTENT_ALREADY_EXISTS;
+        code = RestErrorCode.INTENT_ALREADY_EXISTS;
         summary = "";
         formattedDescription = "";
     }
@@ -30,7 +30,7 @@
      * @param summary summary string for the new error
      * @param formattedDescription formatted full description of the error
      */
-    private RestError(final RestErrorCodes.RestErrorCode code,
+    private RestError(final RestErrorCode code,
                       final String summary,
                       final String formattedDescription) {
         this.code = code;
@@ -43,7 +43,7 @@
      *
      * @return error code
      */
-    public RestErrorCodes.RestErrorCode getCode() {
+    public RestErrorCode getCode() {
         return code;
     }
 
@@ -74,7 +74,7 @@
      *                   the description
      * @return new RestError representing this intance
      */
-    public static RestError createRestError(final RestErrorCodes.RestErrorCode code,
+    public static RestError createRestError(final RestErrorCode code,
                                             final Object... parameters) {
         final RestErrorCatalogEntry error = RestErrorCatalog.getRestError(code);
         final String formattedDescription =