Package com.alu.e3.prov.restapi.model

Examples of com.alu.e3.prov.restapi.model.Validation


    StaticTdr s = new StaticTdr();
    s.setValue          (tdrStaticRule.getValue());
    s.setTdrPropName      (tdrStaticRule.getTdrPropName());
    s.setPropertyName      (tdrStaticRule.getPropertyName());

    TdrType tdrType = new TdrType();
    s.setTypes          (tdrType);
    tdrType.getType().addAll  (tdrStaticRule.getTypes());

    return s;
  }
View Full Code Here


    DynamicTdr s = new DynamicTdr();
    s.setHttpHeaderName      (tdrDynamicRule.getHttpHeaderName());
    s.setTdrPropName      (tdrDynamicRule.getTdrPropName());
    s.setExtractFrom      (tdrDynamicRule.getExtractFrom());

    TdrType tdrType = new TdrType();
    s.setTypes          (tdrType);
    tdrType.getType().addAll  (tdrDynamicRule.getTypes());

    return s;
  }
View Full Code Here

  private static final Validation fromDataModel(com.alu.e3.data.model.sub.Validation val) {
    if (val == null)
      return null;

    Validation rVal = new Validation();

    if (val.getXml() != null) {
      rVal.setXml(new Validation.Xml());
    }
    if (val.getSchema() != null) {
      rVal.setSchema(fromDataModel(val.getSchema()));
    }

    if (val.getSoap() != null) {
      rVal.setSoap(new Validation.Soap(com.alu.e3.prov.restapi.model.SoapVersionEnum.fromValue(val.getSoap().getVersion().value())));
    }

    return rVal;
  }
View Full Code Here

  @Test
  public void testCreateAndGetApiXmlValidation() {
    Api data = newApi();   

    Validation val = new Validation();
    data.setValidation(val);
    val.setXml(new Validation.Xml());
    //val.setSoap(new Validation.Soap(SoapVersionEnum.SOAP11));   
    //val.setSchema(new Validation.Schema(SchemaValidationEnum.WSDL, "hjhjsdhjsdhjsdh48647"));

    String apiID = ""+(new Random().nextLong());
    data.setId(apiID);
View Full Code Here

    addJarEntry(entries, buffer.getBuffer().toString().getBytes("UTF-8"), "META-INF/spring/route-context.xml");
  }

  protected void doGenResources(List<JarEntryData> entries, Api api, Map<Object, Object> variablesMap) throws UnsupportedEncodingException, IOException {
    if (api.getValidation() != null) {
      Validation val = api.getValidation();

      Schema schema = val.getSchema();

      if (schema != null) {

        // loop on schema resources and store them on files
        StringBuffer buf = new StringBuffer();
View Full Code Here

  private final static String ERROR_PREFIX = " Invalid request syntax: ";

  @Override
  public void assertValidatioSchemaConsystency(Api provRequest) {

    Validation validation = provRequest.getValidation();
    if (null == validation)
      return;
    Validation.Schema schema = validation.getSchema();
    if (null == schema)
      return;

    // !!! below we are checking stuff that is supposed to be already checked by prov.xsd (e.g. many null check) !!!
View Full Code Here

   
    return perfWatch;
  }
 
  public TdrStreamWriter(File dir) throws TransformerConfigurationException {
    this(new RotatableFileWriterProvider(dir, TDR_FILE_SIZE, TDR_FILE_AGE) {
      @Override
      protected String getFileName() {
        return "tdrs." + System.currentTimeMillis() + ".xml";   // TDR file name
      }
View Full Code Here

   
    topologyWatcher.setPollingInterval(POLLING_INTERVAL);
   
    topologyClient = new DummyTopologyClient();
   
    healthCheckFactory = new DummyHealthCheckFactory();
   
    setHealthCheckGateways(gatewayList);
    setHealthCheckGatewaysActive(gatewayActiveList);
    setHealthCheckSpeakers(activeSpeakerList);
   
View Full Code Here

  private void createTestResources(String[] gatewayList, String[] gatewayActiveList, String[] activeSpeakerList) {
    topologyWatcher = new TopologyWatcher();
   
    topologyWatcher.setPollingInterval(POLLING_INTERVAL);
   
    topologyClient = new DummyTopologyClient();
   
    healthCheckFactory = new DummyHealthCheckFactory();
   
    setHealthCheckGateways(gatewayList);
    setHealthCheckGatewaysActive(gatewayActiveList);
View Full Code Here

   
    return instance;
  }
 
  private void createTestResources(String[] gatewayList, String[] gatewayActiveList, String[] activeSpeakerList) {
    topologyWatcher = new TopologyWatcher();
   
    topologyWatcher.setPollingInterval(POLLING_INTERVAL);
   
    topologyClient = new DummyTopologyClient();
   
View Full Code Here

TOP

Related Classes of com.alu.e3.prov.restapi.model.Validation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.