org.axway.grapes.server.webapp
Class DataValidator

java.lang.Object
  extended by org.axway.grapes.server.webapp.DataValidator

public final class DataValidator
extends Object

Data Validator

Validates the posted mime to make sure that no corrupted data is sent to Grapes.

Author:
jdcoffre

Method Summary
static void validate(Artifact artifact)
          Checks if the provided artifact is valid and could be stored into the database
static void validate(License license)
          Checks if the provided license is valid and could be stored into the database
static void validate(Module module)
          Checks if the provided module is valid and could be stored into the database
static void validate(Organization organization)
          Checks if the provided organization is valid and could be stored into the database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

validate

public static void validate(Artifact artifact)
Checks if the provided artifact is valid and could be stored into the database

Parameters:
artifact - the artifact to test
Throws:
javax.ws.rs.WebApplicationException - if the data is corrupted

validate

public static void validate(License license)
Checks if the provided license is valid and could be stored into the database

Parameters:
license - the license to test
Throws:
javax.ws.rs.WebApplicationException - if the data is corrupted

validate

public static void validate(Module module)
Checks if the provided module is valid and could be stored into the database

Parameters:
module - the module to test
Throws:
javax.ws.rs.WebApplicationException - if the data is corrupted

validate

public static void validate(Organization organization)
Checks if the provided organization is valid and could be stored into the database

Parameters:
organization - Organization
Throws:
javax.ws.rs.WebApplicationException - if the data is corrupted


Copyright © 2014. All Rights Reserved.