dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20356
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9252: FRED-API: simplified validation logic a bit, added identifiers validator. Validation should still...
------------------------------------------------------------
revno: 9252
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-12-10 15:34:13 +0300
message:
FRED-API: simplified validation logic a bit, added identifiers validator. Validation should still be considered WIP.
removed:
dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/group/CreateSequence.java
dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/group/UpdateSequence.java
added:
dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/IdentifiersValidator.java
dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/annotation/ValidIdentifiers.java
modified:
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/useraudit/DefaultUserAuditService.java
dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/controller/FacilityController.java
dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/controller/FacilityServiceController.java
dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Facility.java
dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/PropertiesValidator.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
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/useraudit/DefaultUserAuditService.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/useraudit/DefaultUserAuditService.java 2012-11-23 12:51:00 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/useraudit/DefaultUserAuditService.java 2012-12-10 12:34:13 +0000
@@ -35,7 +35,7 @@
* @author Saptarshi Purkayastha
* @author Lars Helge Overland
*/
-public class DefaultUserAuditService
+public class DefaultUserAuditService
implements UserAuditService
{
private static final Log log = LogFactory.getLog( DefaultUserAuditService.class );
=== modified file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/controller/FacilityController.java'
--- dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/controller/FacilityController.java 2012-12-09 18:07:54 +0000
+++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/controller/FacilityController.java 2012-12-10 12:34:13 +0000
@@ -38,8 +38,8 @@
import org.hisp.dhis.web.webapi.v1.domain.Facilities;
import org.hisp.dhis.web.webapi.v1.domain.Facility;
import org.hisp.dhis.web.webapi.v1.utils.ValidationUtils;
-import org.hisp.dhis.web.webapi.v1.validation.group.CreateSequence;
-import org.hisp.dhis.web.webapi.v1.validation.group.UpdateSequence;
+import org.hisp.dhis.web.webapi.v1.validation.group.Create;
+import org.hisp.dhis.web.webapi.v1.validation.group.Update;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.convert.ConversionService;
import org.springframework.http.HttpHeaders;
@@ -52,6 +52,7 @@
import javax.validation.ConstraintViolation;
import javax.validation.Validator;
+import javax.validation.groups.Default;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
@@ -132,7 +133,7 @@
@RequestMapping( value = "", method = RequestMethod.POST )
public ResponseEntity<String> createFacility( @RequestBody Facility facility ) throws IOException
{
- Set<ConstraintViolation<Facility>> constraintViolations = validator.validate( facility, CreateSequence.class );
+ Set<ConstraintViolation<Facility>> constraintViolations = validator.validate( facility, Default.class, Create.class );
String json = ValidationUtils.constraintViolationsToJson( constraintViolations );
@@ -168,7 +169,7 @@
facility.setId( id );
OrganisationUnit organisationUnit = conversionService.convert( facility, OrganisationUnit.class );
- Set<ConstraintViolation<Facility>> constraintViolations = validator.validate( facility, UpdateSequence.class );
+ Set<ConstraintViolation<Facility>> constraintViolations = validator.validate( facility, Default.class, Update.class );
String json = ValidationUtils.constraintViolationsToJson( constraintViolations );
=== modified file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/controller/FacilityServiceController.java'
--- dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/controller/FacilityServiceController.java 2012-12-08 10:15:52 +0000
+++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/controller/FacilityServiceController.java 2012-12-10 12:34:13 +0000
@@ -31,8 +31,8 @@
import org.hisp.dhis.organisationunit.OrganisationUnitService;
import org.hisp.dhis.web.webapi.v1.domain.Facility;
import org.hisp.dhis.web.webapi.v1.utils.ValidationUtils;
-import org.hisp.dhis.web.webapi.v1.validation.group.CreateSequence;
-import org.hisp.dhis.web.webapi.v1.validation.group.UpdateSequence;
+import org.hisp.dhis.web.webapi.v1.validation.group.Create;
+import org.hisp.dhis.web.webapi.v1.validation.group.Update;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.HttpStatus;
@@ -46,20 +46,21 @@
import javax.validation.ConstraintViolation;
import javax.validation.Validator;
+import javax.validation.groups.Default;
import java.io.IOException;
import java.util.Set;
/**
* @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
*/
-@Controller( value = "facility-service-controller-" + FredController.PREFIX )
-@RequestMapping( FacilityServiceController.RESOURCE_PATH )
+@Controller(value = "facility-service-controller-" + FredController.PREFIX)
+@RequestMapping(FacilityServiceController.RESOURCE_PATH)
public class FacilityServiceController
{
public static final String RESOURCE_PATH = "/" + FredController.PREFIX + "/facility-service";
@Autowired
- @Qualifier( "org.hisp.dhis.organisationunit.OrganisationUnitService" )
+ @Qualifier("org.hisp.dhis.organisationunit.OrganisationUnitService")
private OrganisationUnitService organisationUnitService;
@Autowired
@@ -69,7 +70,7 @@
// EXTRA WEB METHODS
//--------------------------------------------------------------------------
- @RequestMapping( value = "/{id}/activate", method = RequestMethod.POST )
+ @RequestMapping(value = "/{id}/activate", method = RequestMethod.POST)
public ResponseEntity<Void> activateFacility( @PathVariable String id )
{
OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( id );
@@ -85,7 +86,7 @@
return new ResponseEntity<Void>( HttpStatus.NOT_FOUND );
}
- @RequestMapping( value = "/{id}/deactivate", method = RequestMethod.POST )
+ @RequestMapping(value = "/{id}/deactivate", method = RequestMethod.POST)
public ResponseEntity<Void> deactivateFacility( @PathVariable String id )
{
OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( id );
@@ -101,10 +102,10 @@
return new ResponseEntity<Void>( HttpStatus.NOT_FOUND );
}
- @RequestMapping( value = "/validate", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE )
+ @RequestMapping(value = "/validate", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<String> validateFacilityForCreate( @RequestBody Facility facility ) throws IOException
{
- Set<ConstraintViolation<Facility>> constraintViolations = validator.validate( facility, CreateSequence.class );
+ Set<ConstraintViolation<Facility>> constraintViolations = validator.validate( facility, Default.class, Create.class );
String json = ValidationUtils.constraintViolationsToJson( constraintViolations );
@@ -118,10 +119,10 @@
}
}
- @RequestMapping( value = "/validate", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE )
+ @RequestMapping(value = "/validate", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<String> validateFacilityForUpdate( @RequestBody Facility facility ) throws IOException
{
- Set<ConstraintViolation<Facility>> constraintViolations = validator.validate( facility, UpdateSequence.class );
+ Set<ConstraintViolation<Facility>> constraintViolations = validator.validate( facility, Default.class, Update.class );
String json = ValidationUtils.constraintViolationsToJson( constraintViolations );
=== modified file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Facility.java'
--- dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Facility.java 2012-12-09 19:49:26 +0000
+++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Facility.java 2012-12-10 12:34:13 +0000
@@ -29,9 +29,9 @@
import org.hibernate.validator.constraints.Length;
import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.web.webapi.v1.validation.constraint.annotation.ValidIdentifiers;
import org.hisp.dhis.web.webapi.v1.validation.constraint.annotation.ValidProperties;
import org.hisp.dhis.web.webapi.v1.validation.constraint.annotation.ValidUidReference;
-import org.hisp.dhis.web.webapi.v1.validation.group.Standard;
import org.hisp.dhis.web.webapi.v1.validation.group.Update;
import javax.validation.constraints.NotNull;
@@ -44,9 +44,7 @@
public class Facility
{
// Internal system identifier
- @Null( groups = Standard.Null.class )
- @NotNull( groups = Standard.NotNull.class )
- @Length( min = 11, max = 11, groups = Standard.Length.class )
+ @Length( min = 11, max = 11 )
@ValidUidReference( value = OrganisationUnit.class, groups = Update.class )
private String id;
@@ -60,6 +58,7 @@
private Boolean active;
// URL link to the unique ID API resource for the facility
+ @Null
private String url;
// ISO 8601 timestamp, including timezone, of when the facility was created
@@ -75,6 +74,7 @@
private List<Double> coordinates = new ArrayList<Double>();
// External Facility Identifiers
+ @ValidIdentifiers
private List<Identifier> identifiers = new ArrayList<Identifier>();
// Implementation specific custom properties
=== added file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/IdentifiersValidator.java'
--- dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/IdentifiersValidator.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/IdentifiersValidator.java 2012-12-10 12:34:13 +0000
@@ -0,0 +1,111 @@
+package org.hisp.dhis.web.webapi.v1.validation.constraint;
+
+/*
+ * Copyright (c) 2004-2012, 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.
+ */
+
+import org.hisp.dhis.common.IdentifiableObjectManager;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.web.webapi.v1.domain.Identifier;
+import org.hisp.dhis.web.webapi.v1.validation.constraint.annotation.ValidIdentifiers;
+import org.hisp.dhis.web.webapi.v1.validation.group.Create;
+import org.hisp.dhis.web.webapi.v1.validation.group.Update;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
+ */
+public class IdentifiersValidator implements ConstraintValidator<ValidIdentifiers, List<Identifier>>
+{
+ @Autowired
+ private IdentifiableObjectManager identifiableObjectManager;
+
+ private boolean isCreating = true;
+
+ @Override
+ public void initialize( ValidIdentifiers constraintAnnotation )
+ {
+ List<Class<?>> groups = Arrays.asList( constraintAnnotation.groups() );
+
+ if ( groups.contains( Create.class ) )
+ {
+ isCreating = true;
+ }
+ else if ( groups.contains( Update.class ) )
+ {
+ isCreating = false;
+ }
+ }
+
+ @Override
+ public boolean isValid( List<Identifier> value, ConstraintValidatorContext context )
+ {
+ boolean returnValue = true;
+
+ for ( Identifier identifier : value )
+ {
+ // only dhis2 codes are supported by this validator for now
+ if ( identifier.getAgency().equalsIgnoreCase( Identifier.DHIS2_AGENCY )
+ && identifier.getContext().equalsIgnoreCase( Identifier.DHIS2_CODE_CONTEXT ) )
+ {
+ OrganisationUnit organisationUnit = identifiableObjectManager.getByCode( OrganisationUnit.class, identifier.getId() );
+
+ if ( organisationUnit != null )
+ {
+ if ( isCreating )
+ {
+ context.disableDefaultConstraintViolation();
+ context.buildConstraintViolationWithTemplate( "An object already exists with that identifier." )
+ .addNode( identifier.getContext() )
+ .addConstraintViolation();
+
+ returnValue = false;
+ }
+ }
+ else
+ {
+ // TODO for this to work properly, we would need to have access to the current object being validated.
+ /*
+ if ( !isCreating )
+ {
+ context.disableDefaultConstraintViolation();
+ context.buildConstraintViolationWithTemplate( "An object already exists with that identifier." )
+ .addNode( identifier.getContext() )
+ .addConstraintViolation();
+ }
+ */
+ }
+ }
+ }
+
+ return returnValue;
+ }
+}
=== modified file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/PropertiesValidator.java'
--- dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/PropertiesValidator.java 2012-12-09 16:50:22 +0000
+++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/PropertiesValidator.java 2012-12-10 12:34:13 +0000
@@ -62,6 +62,7 @@
{
context.disableDefaultConstraintViolation();
context.buildConstraintViolationWithTemplate( String.format( "parent does not point to a valid facility." ) )
+ .addNode( "parent" )
.addConstraintViolation();
returnValue = false;
@@ -73,6 +74,7 @@
{
context.disableDefaultConstraintViolation();
context.buildConstraintViolationWithTemplate( String.format( "dataSets has one or more non-matching IDs." ) )
+ .addNode( "dataSets" )
.addConstraintViolation();
returnValue = false;
=== added file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/annotation/ValidIdentifiers.java'
--- dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/annotation/ValidIdentifiers.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/annotation/ValidIdentifiers.java 2012-12-10 12:34:13 +0000
@@ -0,0 +1,60 @@
+package org.hisp.dhis.web.webapi.v1.validation.constraint.annotation;
+
+/*
+ * Copyright (c) 2004-2012, 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.
+ */
+
+import org.hisp.dhis.web.webapi.v1.validation.constraint.IdentifiersValidator;
+
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import java.lang.annotation.*;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
+ */
+@Target( { ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE } )
+@Retention( RetentionPolicy.RUNTIME )
+@Constraint( validatedBy = IdentifiersValidator.class )
+public @interface ValidIdentifiers
+{
+ String message() default "Identifiers did not validate.";
+
+ Class<?>[] groups() default { };
+
+ Class<? extends Payload>[] payload() default { };
+
+ @Target( { TYPE } )
+ @Retention( RUNTIME )
+ @Documented
+ public @interface List
+ {
+ ValidIdentifiers[] value();
+ }
+}
=== removed file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/group/CreateSequence.java'
--- dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/group/CreateSequence.java 2012-12-08 10:15:52 +0000
+++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/group/CreateSequence.java 1970-01-01 00:00:00 +0000
@@ -1,39 +0,0 @@
-package org.hisp.dhis.web.webapi.v1.validation.group;
-
-/*
- * Copyright (c) 2004-2012, 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.
- */
-
-import javax.validation.GroupSequence;
-import javax.validation.groups.Default;
-
-/**
- * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
- */
-@GroupSequence( { Standard.Null.class, Default.class } )
-public interface CreateSequence
-{
-}
=== removed file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/group/UpdateSequence.java'
--- dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/group/UpdateSequence.java 2012-12-08 10:15:52 +0000
+++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/group/UpdateSequence.java 1970-01-01 00:00:00 +0000
@@ -1,39 +0,0 @@
-package org.hisp.dhis.web.webapi.v1.validation.group;
-
-/*
- * Copyright (c) 2004-2012, 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.
- */
-
-import javax.validation.GroupSequence;
-import javax.validation.groups.Default;
-
-/**
- * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
- */
-@GroupSequence( { Standard.NotNull.class, Standard.Length.class, Update.class, Default.class } )
-public interface UpdateSequence
-{
-}