Examples of StringAttribute


Examples of org.geomajas.layer.feature.attribute.StringAttribute

    Assert.assertEquals("blas2", response.getValue());
  }

  @Test
  public void interceptorTestBoundaries() throws Exception {
    StringAttribute response = new StringAttribute("bla");
    PipelineContext context = pipelineService.createContext();
    pipelineService.execute("interceptorTest4", "base", context, response);
    Assert.assertEquals("bla_before_s1s2_after_", response.getValue());
  }
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.StringAttribute

    Assert.assertEquals("bla_before_s1s2_after_", response.getValue());
  }

  @Test
  public void interceptorTestExecutionModeAll() throws Exception {
    StringAttribute response = new StringAttribute("bla");
    PipelineContext context = pipelineService.createContext();
    pipelineService.execute("interceptorExecutionMode1", "base", context, response);
    Assert.assertEquals("bla_before_s1_after_s2", response.getValue());
  }
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.StringAttribute

    Assert.assertEquals("bla_before_s1_after_s2", response.getValue());
  }

  @Test
  public void interceptorTestExecutionSkipSteps() throws Exception {
    StringAttribute response = new StringAttribute("bla");
    PipelineContext context = pipelineService.createContext();
    pipelineService.execute("interceptorExecutionMode2", "base", context, response);
    Assert.assertEquals("bla_before__after_s2", response.getValue());
  }
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.StringAttribute

    Assert.assertEquals("bla_before__after_s2", response.getValue());
  }

  @Test
  public void interceptorTestExecutionModeStepsNotAfter() throws Exception {
    StringAttribute response = new StringAttribute("bla");
    PipelineContext context = pipelineService.createContext();
    pipelineService.execute("interceptorExecutionMode3", "base", context, response);
    Assert.assertEquals("bla_before_s1s2", response.getValue());
  }
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.StringAttribute

    Assert.assertEquals("bla_before_s1s2", response.getValue());
  }

  @Test
  public void interceptorTestExecutionModeNone() throws Exception {
    StringAttribute response = new StringAttribute("bla");
    PipelineContext context = pipelineService.createContext();
    pipelineService.execute("interceptorExecutionMode4", "base", context, response);
    Assert.assertEquals("bla_before_s2", response.getValue());
  }
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.StringAttribute

    Assert.assertEquals("bla_before_s2", response.getValue());
  }

  @Test
  public void testComplexInterceptorCombination() throws Exception {
    StringAttribute response = new StringAttribute("*");
    PipelineContext context = pipelineService.createContext();
    pipelineService.execute("complexPipeline", "base", context, response);
    Assert.assertEquals("*([s1s2]{<s3>s4})", response.getValue());
  }
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.StringAttribute

    HashMap<String, Attribute> attributes = new HashMap<String, Attribute>();

    for (AttributeDescriptor desc : feature.getType().getAttributeDescriptors()) {
      Object obj = feature.getAttribute(desc.getName());
      if (null != obj) {
        attributes.put(desc.getLocalName(), new StringAttribute(obj.toString()));
      }
    }
    dto.setAttributes(attributes);
    dto.setId(feature.getID());
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.StringAttribute

    securityContext.setAuthentications("token", authentications);

    InternalFeature feature = new InternalFeatureImpl();
    Map<String, Attribute> attributes = new HashMap<String, Attribute>();
    feature.setAttributes(attributes);
    attributes.put(ATTRIBUTE_ID, new StringAttribute("bla"));
    Assert.assertTrue(securityContext.isAttributeReadable(LAYER_ID, feature, ATTRIBUTE_ID));
    Assert.assertTrue(securityContext.isAttributeWritable(LAYER_ID, feature, ATTRIBUTE_ID));
  }
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.StringAttribute

    securityContext.setAuthentications("token", authentications);

    InternalFeature feature = new InternalFeatureImpl();
    Map<String, Attribute> attributes = new HashMap<String, Attribute>();
    feature.setAttributes(attributes);
    attributes.put(ATTRIBUTE_ID, new StringAttribute("bla"));
    Assert.assertTrue(securityContext.isAttributeReadable(LAYER_ID, feature, ATTRIBUTE_ID));
    Assert.assertTrue(securityContext.isAttributeWritable(LAYER_ID, feature, ATTRIBUTE_ID));
  }
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.StringAttribute

    securityContext.setAuthentications("token", authentications);

    InternalFeature feature = new InternalFeatureImpl();
    Map<String, Attribute> attributes = new HashMap<String, Attribute>();
    feature.setAttributes(attributes);
    attributes.put(ATTRIBUTE_ID, new StringAttribute("bla"));
    Assert.assertTrue(securityContext.isAttributeReadable(LAYER_ID, feature, ATTRIBUTE_ID));
    Assert.assertTrue(securityContext.isAttributeWritable(LAYER_ID, feature, ATTRIBUTE_ID));

    feature.getAttributes().put(ATTRIBUTE_ID, new StringAttribute("rea"));
    Assert.assertFalse(securityContext.isAttributeReadable(LAYER_ID, feature, ATTRIBUTE_ID));
    Assert.assertTrue(securityContext.isAttributeWritable(LAYER_ID, feature, ATTRIBUTE_ID));

    feature.getAttributes().put(ATTRIBUTE_ID, new StringAttribute("wri"));
    Assert.assertTrue(securityContext.isAttributeReadable(LAYER_ID, feature, ATTRIBUTE_ID));
    Assert.assertFalse(securityContext.isAttributeWritable(LAYER_ID, feature, ATTRIBUTE_ID));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.