← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21565: renamed WebMessageStatus => Status in DXF2 module

 

------------------------------------------------------------
revno: 21565
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2016-01-04 11:14:42 +0700
message:
  renamed WebMessageStatus => Status in DXF2 module
removed:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/webmessage/WebMessageStatus.java
added:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/common/Status.java
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/webmessage/WebMessage.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CrudControllerAdvice.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ExpressionController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileResourceController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/ProgramIndicatorController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/WebMessageUtils.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== added file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/common/Status.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/common/Status.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/common/Status.java	2016-01-04 04:14:42 +0000
@@ -0,0 +1,37 @@
+package org.hisp.dhis.dxf2.common;
+
+/*
+ * Copyright (c) 2004-2016, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
+ */
+public enum Status
+{
+    OK, WARNING, ERROR
+}

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/webmessage/WebMessage.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/webmessage/WebMessage.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/webmessage/WebMessage.java	2016-01-04 04:14:42 +0000
@@ -34,6 +34,7 @@
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
 import com.google.common.base.MoreObjects;
 import org.hisp.dhis.common.DxfNamespaces;
+import org.hisp.dhis.dxf2.common.Status;
 import org.springframework.http.HttpStatus;
 
 /**
@@ -49,9 +50,9 @@
      * Message status, currently two statuses are available: OK, ERROR. Default
      * value is OK.
      *
-     * @see WebMessageStatus
+     * @see Status
      */
-    protected WebMessageStatus status = WebMessageStatus.OK;
+    protected Status status = Status.OK;
 
     /**
      * Internal code for this message. Should be used to help with third party clients which
@@ -92,12 +93,12 @@
     {
     }
 
-    public WebMessage( WebMessageStatus status )
+    public WebMessage( Status status )
     {
         this.status = status;
     }
 
-    public WebMessage( WebMessageStatus status, HttpStatus httpStatus )
+    public WebMessage( Status status, HttpStatus httpStatus )
     {
         this.status = status;
         this.httpStatus = httpStatus;
@@ -109,17 +110,17 @@
 
     public boolean isOk()
     {
-        return WebMessageStatus.OK == status;
+        return Status.OK == status;
     }
 
     public boolean isWarning()
     {
-        return WebMessageStatus.WARNING == status;
+        return Status.WARNING == status;
     }
 
     public boolean isError()
     {
-        return WebMessageStatus.ERROR == status;
+        return Status.ERROR == status;
     }
 
     // -------------------------------------------------------------------------
@@ -128,12 +129,12 @@
 
     @JsonProperty
     @JacksonXmlProperty( isAttribute = true )
-    public WebMessageStatus getStatus()
+    public Status getStatus()
     {
         return status;
     }
 
-    public void setStatus( WebMessageStatus status )
+    public void setStatus( Status status )
     {
         this.status = status;
     }

=== removed file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/webmessage/WebMessageStatus.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/webmessage/WebMessageStatus.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/webmessage/WebMessageStatus.java	1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
-package org.hisp.dhis.dxf2.webmessage;
-
-/*
- * Copyright (c) 2004-2016, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
- */
-public enum WebMessageStatus
-{
-    OK, WARNING, ERROR
-}

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CrudControllerAdvice.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CrudControllerAdvice.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CrudControllerAdvice.java	2016-01-04 04:14:42 +0000
@@ -35,7 +35,7 @@
 import org.hisp.dhis.common.exception.InvalidIdentifierReferenceException;
 import org.hisp.dhis.dataapproval.exceptions.DataApprovalException;
 import org.hisp.dhis.dxf2.webmessage.WebMessageException;
-import org.hisp.dhis.dxf2.webmessage.WebMessageStatus;
+import org.hisp.dhis.dxf2.common.Status;
 import org.hisp.dhis.query.QueryException;
 import org.hisp.dhis.query.QueryParserException;
 import org.hisp.dhis.system.util.DateUtils;
@@ -149,6 +149,6 @@
     @ExceptionHandler( HttpStatusCodeException.class )
     public void httpStatusCodeExceptionHandler( HttpStatusCodeException ex, HttpServletResponse response, HttpServletRequest request )
     {
-        webMessageService.send( WebMessageUtils.createWebMessage( ex.getMessage(), WebMessageStatus.ERROR, ex.getStatusCode() ), response, request );
+        webMessageService.send( WebMessageUtils.createWebMessage( ex.getMessage(), Status.ERROR, ex.getStatusCode() ), response, request );
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ExpressionController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ExpressionController.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ExpressionController.java	2016-01-04 04:14:42 +0000
@@ -33,7 +33,7 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.hisp.dhis.dxf2.webmessage.DescriptiveWebMessage;
-import org.hisp.dhis.dxf2.webmessage.WebMessageStatus;
+import org.hisp.dhis.dxf2.common.Status;
 import org.hisp.dhis.expression.ExpressionService;
 import org.hisp.dhis.expression.ExpressionValidationOutcome;
 import org.hisp.dhis.i18n.I18n;
@@ -71,7 +71,7 @@
         ExpressionValidationOutcome result = expressionService.expressionIsValid( expression );
         
         DescriptiveWebMessage message = new DescriptiveWebMessage();
-        message.setStatus( result.isValid() ? WebMessageStatus.OK : WebMessageStatus.ERROR );
+        message.setStatus( result.isValid() ? Status.OK : Status.ERROR );
         message.setMessage( i18n.getString( result.getKey() ) );
         
         if ( result.isValid() )

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileResourceController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileResourceController.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileResourceController.java	2016-01-04 04:14:42 +0000
@@ -35,7 +35,7 @@
 import org.apache.commons.lang3.StringUtils;
 import org.hisp.dhis.dxf2.webmessage.WebMessage;
 import org.hisp.dhis.dxf2.webmessage.WebMessageException;
-import org.hisp.dhis.dxf2.webmessage.WebMessageStatus;
+import org.hisp.dhis.dxf2.common.Status;
 import org.hisp.dhis.dxf2.webmessage.responses.FileResourceWebMessageResponse;
 import org.hisp.dhis.fileresource.FileResource;
 import org.hisp.dhis.fileresource.FileResourceDomain;
@@ -150,7 +150,7 @@
             throw new WebMessageException( WebMessageUtils.error( "Saving the file failed." ) );
         }
 
-        WebMessage webMessage = new WebMessage( WebMessageStatus.OK, HttpStatus.ACCEPTED );
+        WebMessage webMessage = new WebMessage( Status.OK, HttpStatus.ACCEPTED );
         webMessage.setResponse( new FileResourceWebMessageResponse( fileResource ) );
 
         return webMessage;

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java	2016-01-04 04:14:42 +0000
@@ -39,7 +39,7 @@
 import org.apache.commons.io.IOUtils;
 import org.hisp.dhis.dxf2.webmessage.WebMessage;
 import org.hisp.dhis.dxf2.webmessage.WebMessageException;
-import org.hisp.dhis.dxf2.webmessage.WebMessageStatus;
+import org.hisp.dhis.dxf2.common.Status;
 import org.hisp.dhis.external.location.LocationManager;
 import org.hisp.dhis.external.location.LocationManagerException;
 import org.hisp.dhis.setting.SettingKey;
@@ -165,7 +165,7 @@
 
         if( !mimeType.isCompatibleWith( MimeTypeUtils.IMAGE_PNG ))
         {
-            throw new WebMessageException( new WebMessage( WebMessageStatus.WARNING, HttpStatus.UNSUPPORTED_MEDIA_TYPE ) );
+            throw new WebMessageException( new WebMessage( Status.WARNING, HttpStatus.UNSUPPORTED_MEDIA_TYPE ) );
         }
 
         // Only keys in the white list are accepted at the current time

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/ProgramIndicatorController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/ProgramIndicatorController.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/ProgramIndicatorController.java	2016-01-04 04:14:42 +0000
@@ -29,7 +29,7 @@
  */
 
 import org.hisp.dhis.dxf2.webmessage.DescriptiveWebMessage;
-import org.hisp.dhis.dxf2.webmessage.WebMessageStatus;
+import org.hisp.dhis.dxf2.common.Status;
 import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.i18n.I18nManager;
 import org.hisp.dhis.program.ProgramIndicator;
@@ -70,7 +70,7 @@
         String result = programIndicatorService.expressionIsValid( expression );
 
         DescriptiveWebMessage message = new DescriptiveWebMessage();
-        message.setStatus( ProgramIndicator.VALID.equals( result ) ? WebMessageStatus.OK : WebMessageStatus.ERROR );
+        message.setStatus( ProgramIndicator.VALID.equals( result ) ? Status.OK : Status.ERROR );
         message.setMessage( i18n.getString( result ) );
 
         if ( message.isOk() )
@@ -90,7 +90,7 @@
         String result = programIndicatorService.filterIsValid( expression );
 
         DescriptiveWebMessage message = new DescriptiveWebMessage();
-        message.setStatus( ProgramIndicator.VALID.equals( result ) ? WebMessageStatus.OK : WebMessageStatus.ERROR );
+        message.setStatus( ProgramIndicator.VALID.equals( result ) ? Status.OK : Status.ERROR );
         message.setMessage( i18n.getString( result ) );
 
         if ( message.isOk() )

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/WebMessageUtils.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/WebMessageUtils.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/WebMessageUtils.java	2016-01-04 04:14:42 +0000
@@ -34,7 +34,7 @@
 import org.hisp.dhis.dxf2.metadata.ImportTypeSummary;
 import org.hisp.dhis.validation.ValidationViolation;
 import org.hisp.dhis.dxf2.webmessage.WebMessage;
-import org.hisp.dhis.dxf2.webmessage.WebMessageStatus;
+import org.hisp.dhis.dxf2.common.Status;
 import org.hisp.dhis.dxf2.webmessage.responses.ValidationViolationsWebMessageResponse;
 import org.springframework.http.HttpStatus;
 
@@ -45,7 +45,7 @@
  */
 public final class WebMessageUtils
 {
-    public static WebMessage createWebMessage( String message, WebMessageStatus status, HttpStatus httpStatus )
+    public static WebMessage createWebMessage( String message, Status status, HttpStatus httpStatus )
     {
         WebMessage webMessage = new WebMessage( status, httpStatus );
         webMessage.setMessage( message );
@@ -53,7 +53,7 @@
         return webMessage;
     }
 
-    public static WebMessage createWebMessage( String message, String devMessage, WebMessageStatus status, HttpStatus httpStatus )
+    public static WebMessage createWebMessage( String message, String devMessage, Status status, HttpStatus httpStatus )
     {
         WebMessage webMessage = new WebMessage( status, httpStatus );
         webMessage.setMessage( message );
@@ -64,108 +64,108 @@
 
     public static WebMessage ok( String message )
     {
-        return createWebMessage( message, WebMessageStatus.OK, HttpStatus.OK );
+        return createWebMessage( message, Status.OK, HttpStatus.OK );
     }
 
     public static WebMessage ok( String message, String devMessage )
     {
-        return createWebMessage( message, devMessage, WebMessageStatus.OK, HttpStatus.OK );
+        return createWebMessage( message, devMessage, Status.OK, HttpStatus.OK );
     }
 
     public static WebMessage created( String message )
     {
-        return createWebMessage( message, WebMessageStatus.OK, HttpStatus.CREATED );
+        return createWebMessage( message, Status.OK, HttpStatus.CREATED );
     }
 
     public static WebMessage created( String message, String devMessage )
     {
-        return createWebMessage( message, devMessage, WebMessageStatus.OK, HttpStatus.CREATED );
+        return createWebMessage( message, devMessage, Status.OK, HttpStatus.CREATED );
     }
 
     public static WebMessage notFound( String message )
     {
-        return createWebMessage( message, WebMessageStatus.ERROR, HttpStatus.NOT_FOUND );
+        return createWebMessage( message, Status.ERROR, HttpStatus.NOT_FOUND );
     }
 
     public static WebMessage notFound( Class<?> klass, String id )
     {
         String message = klass.getSimpleName() + " with id " + id + " could not be found.";
-        return createWebMessage( message, WebMessageStatus.ERROR, HttpStatus.NOT_FOUND );
+        return createWebMessage( message, Status.ERROR, HttpStatus.NOT_FOUND );
     }
 
     public static WebMessage notFound( String message, String devMessage )
     {
-        return createWebMessage( message, devMessage, WebMessageStatus.ERROR, HttpStatus.NOT_FOUND );
+        return createWebMessage( message, devMessage, Status.ERROR, HttpStatus.NOT_FOUND );
     }
 
     public static WebMessage conflict( String message )
     {
-        return createWebMessage( message, WebMessageStatus.ERROR, HttpStatus.CONFLICT );
+        return createWebMessage( message, Status.ERROR, HttpStatus.CONFLICT );
     }
 
     public static WebMessage conflict( String message, String devMessage )
     {
-        return createWebMessage( message, devMessage, WebMessageStatus.ERROR, HttpStatus.CONFLICT );
+        return createWebMessage( message, devMessage, Status.ERROR, HttpStatus.CONFLICT );
     }
 
     public static WebMessage error( String message )
     {
-        return createWebMessage( message, WebMessageStatus.ERROR, HttpStatus.INTERNAL_SERVER_ERROR );
+        return createWebMessage( message, Status.ERROR, HttpStatus.INTERNAL_SERVER_ERROR );
     }
 
     public static WebMessage error( String message, String devMessage )
     {
-        return createWebMessage( message, devMessage, WebMessageStatus.ERROR, HttpStatus.INTERNAL_SERVER_ERROR );
+        return createWebMessage( message, devMessage, Status.ERROR, HttpStatus.INTERNAL_SERVER_ERROR );
     }
 
     public static WebMessage badRequest( String message )
     {
-        return createWebMessage( message, WebMessageStatus.ERROR, HttpStatus.BAD_REQUEST );
+        return createWebMessage( message, Status.ERROR, HttpStatus.BAD_REQUEST );
     }
 
     public static WebMessage badRequest( String message, String devMessage )
     {
-        return createWebMessage( message, devMessage, WebMessageStatus.ERROR, HttpStatus.BAD_REQUEST );
+        return createWebMessage( message, devMessage, Status.ERROR, HttpStatus.BAD_REQUEST );
     }
 
     public static WebMessage forbidden( String message )
     {
-        return createWebMessage( message, WebMessageStatus.ERROR, HttpStatus.FORBIDDEN );
+        return createWebMessage( message, Status.ERROR, HttpStatus.FORBIDDEN );
     }
 
     public static WebMessage forbidden( String message, String devMessage )
     {
-        return createWebMessage( message, devMessage, WebMessageStatus.ERROR, HttpStatus.FORBIDDEN );
+        return createWebMessage( message, devMessage, Status.ERROR, HttpStatus.FORBIDDEN );
     }
 
     public static WebMessage serviceUnavailable( String message )
     {
-        return createWebMessage( message, WebMessageStatus.ERROR, HttpStatus.SERVICE_UNAVAILABLE );
+        return createWebMessage( message, Status.ERROR, HttpStatus.SERVICE_UNAVAILABLE );
     }
 
     public static WebMessage serviceUnavailable( String message, String devMessage )
     {
-        return createWebMessage( message, devMessage, WebMessageStatus.ERROR, HttpStatus.SERVICE_UNAVAILABLE );
+        return createWebMessage( message, devMessage, Status.ERROR, HttpStatus.SERVICE_UNAVAILABLE );
     }
 
     public static WebMessage unprocessableEntity( String message )
     {
-        return createWebMessage( message, WebMessageStatus.ERROR, HttpStatus.UNPROCESSABLE_ENTITY );
+        return createWebMessage( message, Status.ERROR, HttpStatus.UNPROCESSABLE_ENTITY );
     }
 
     public static WebMessage unprocessableEntity( String message, String devMessage )
     {
-        return createWebMessage( message, devMessage, WebMessageStatus.ERROR, HttpStatus.UNPROCESSABLE_ENTITY );
+        return createWebMessage( message, devMessage, Status.ERROR, HttpStatus.UNPROCESSABLE_ENTITY );
     }
 
     public static WebMessage unathorized( String message )
     {
-        return createWebMessage( message, WebMessageStatus.ERROR, HttpStatus.UNAUTHORIZED );
+        return createWebMessage( message, Status.ERROR, HttpStatus.UNAUTHORIZED );
     }
 
     public static WebMessage unathorized( String message, String devMessage )
     {
-        return createWebMessage( message, devMessage, WebMessageStatus.ERROR, HttpStatus.UNAUTHORIZED );
+        return createWebMessage( message, devMessage, Status.ERROR, HttpStatus.UNAUTHORIZED );
     }
 
     public static WebMessage importTypeSummary( ImportTypeSummary importTypeSummary )
@@ -175,19 +175,19 @@
         if ( importTypeSummary.isStatus( ImportStatus.ERROR ) )
         {
             webMessage.setMessage( "An error occurred, please check import summary." );
-            webMessage.setStatus( WebMessageStatus.ERROR );
+            webMessage.setStatus( Status.ERROR );
             webMessage.setHttpStatus( HttpStatus.CONFLICT );
         }
         else if ( !importTypeSummary.getConflicts().isEmpty() )
         {
             webMessage.setMessage( "One more conflicts encountered, please check import summary." );
-            webMessage.setStatus( WebMessageStatus.WARNING );
+            webMessage.setStatus( Status.WARNING );
             webMessage.setHttpStatus( HttpStatus.CONFLICT );
         }
         else
         {
             webMessage.setMessage( "Import was successful." );
-            webMessage.setStatus( WebMessageStatus.OK );
+            webMessage.setStatus( Status.OK );
             webMessage.setHttpStatus( HttpStatus.OK );
         }
 
@@ -203,19 +203,19 @@
         if ( importSummary.isStatus( ImportStatus.ERROR ) )
         {
             webMessage.setMessage( "An error occurred, please check import summary." );
-            webMessage.setStatus( WebMessageStatus.ERROR );
+            webMessage.setStatus( Status.ERROR );
             webMessage.setHttpStatus( HttpStatus.CONFLICT );
         }
         else if ( !importSummary.getConflicts().isEmpty() )
         {
             webMessage.setMessage( "One more conflicts encountered, please check import summary." );
-            webMessage.setStatus( WebMessageStatus.WARNING );
+            webMessage.setStatus( Status.WARNING );
             webMessage.setHttpStatus( HttpStatus.CONFLICT );
         }
         else
         {
             webMessage.setMessage( "Import was successful." );
-            webMessage.setStatus( WebMessageStatus.OK );
+            webMessage.setStatus( Status.OK );
             webMessage.setHttpStatus( HttpStatus.OK );
         }
 
@@ -231,13 +231,13 @@
         if ( importSummaries.getIgnored() > 0 )
         {
             webMessage.setMessage( "One more conflicts encountered, please check import summary." );
-            webMessage.setStatus( WebMessageStatus.WARNING );
+            webMessage.setStatus( Status.WARNING );
             webMessage.setHttpStatus( HttpStatus.CONFLICT );
         }
         else
         {
             webMessage.setMessage( "Import was successful." );
-            webMessage.setStatus( WebMessageStatus.OK );
+            webMessage.setStatus( Status.OK );
             webMessage.setHttpStatus( HttpStatus.OK );
         }
 
@@ -253,7 +253,7 @@
 
         if ( !validationViolations.isEmpty() )
         {
-            webMessage.setStatus( WebMessageStatus.ERROR );
+            webMessage.setStatus( Status.ERROR );
             webMessage.setHttpStatus( HttpStatus.BAD_REQUEST );
         }