test_class.declarator: TEST_ID = 17
test_class.modifier: private static final
test_class.original_string: private static final long TEST_ID = 17;
test_class.type: long
test_class.var_name: TEST_ID
test_class.declarator: TEST_STRING = "test"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_STRING = "test";
test_class.type: String
test_class.var_name: TEST_STRING
test_class.declarator: TEST_INTEGER = 37
test_class.modifier: private static final
test_class.original_string: private static final int TEST_INTEGER = 37;
test_class.type: int
test_class.var_name: TEST_INTEGER
test_class.declarator: TEST_STRING2 = "m2oLinked"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_STRING2 = "m2oLinked";
test_class.type: String
test_class.var_name: TEST_STRING2
test_class.declarator: TEST_STRING3 = "o2mLinked"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_STRING3 = "o2mLinked";
test_class.type: String
test_class.var_name: TEST_STRING3
test_class.declarator: featureBean
test_class.modifier: private
test_class.original_string: private FeatureBean featureBean;
test_class.type: FeatureBean
test_class.var_name: featureBean
test_class.declarator: layerBeans
test_class.modifier: @Autowired
  	@Qualifier("beans")
  	private
test_class.original_string: @Autowired
  	@Qualifier("beans")
  	private VectorLayer layerBeans;
test_class.type: VectorLayer
test_class.var_name: layerBeans
test_class.declarator: lazyLayerBeans
test_class.modifier: private
test_class.original_string: private VectorLayer lazyLayerBeans;
test_class.type: VectorLayer
test_class.var_name: lazyLayerBeans
test_class.declarator: attributeService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private AttributeService attributeService;
test_class.type: AttributeService
test_class.var_name: attributeService
test_class.declarator: dtoConverter
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private DtoConverterService dtoConverter;
test_class.type: DtoConverterService
test_class.var_name: dtoConverter
test_class.declarator: securityManager
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private org.geomajas.security.SecurityManager securityManager;
test_class.type: org.geomajas.security.SecurityManager
test_class.var_name: securityManager
test_class.file: impl/src/test/java/org/geomajas/internal/layer/feature/AttributeServiceTest.java
test_class.identifier: AttributeServiceTest
test_case.body: @Test
  	@DirtiesContext // @todo ?? don't know why this is needed, it affects SecurityContextAttributeAuthorizationTest
  	public void testLazy() throws Exception {
  		InternalFeature feature = new InternalFeatureImpl();
  		Assert.assertNotNull(attributeService.getAttributes(lazyLayerBeans, feature, featureBean));
  		Attribute attribute;
  		Attribute linked;
  		attribute = feature.getAttributes().get("stringAttr");
  		assertThat(attribute.getValue()).isEqualTo(TEST_STRING);
  		assertThat(attribute.isEditable()).isTrue(); // AllowAll -> all editable
  		attribute = feature.getAttributes().get("integerAttr");
  		assertThat(attribute.getValue()).isEqualTo(TEST_INTEGER);
  		assertThat(attribute.isEditable()).isTrue(); // AllowAll -> all editable
  		attribute = feature.getAttributes().get("booleanAttr");
  		assertThat(attribute.getValue()).isEqualTo(Boolean.TRUE);
  		assertThat(attribute.isEditable()).isTrue(); // AllowAll -> all editable
  
  		assertThat(containsLazy(feature.getAttributes())).isTrue();
  		Feature dto = dtoConverter.toDto(feature);
  		assertThat(containsLazy(dto.getAttributes())).isFalse();
  
  		// verify rights on many-to-one attributes
  		attribute = feature.getAttributes().get("manyToOneAttr");
  		assertThat(attribute.isEditable()).isTrue(); // AllowAll -> all editable
  		linked = ((ManyToOneAttribute) attribute).getValue().getAllAttributes().get("stringAttr");
  		assertThat(linked.getValue()).isEqualTo(TEST_STRING2);
  		assertThat(linked.isEditable()).isTrue(); // AllowAll -> all editable
  
  		// verify rights on one-to-many attributes
  		attribute = feature.getAttributes().get("oneToManyAttr");
  		assertThat(attribute.isEditable()).isTrue(); // AllowAll -> all editable
  		linked = ((OneToManyAttribute) attribute).getValue().get(0).getAllAttributes().get("stringAttr");
  		assertThat(linked.getValue()).isEqualTo(TEST_STRING3);
  		assertThat(linked.isEditable()).isTrue(); // AllowAll -> all editable
  	}
test_case.class_method_signature: AttributeServiceTest.testLazy()
test_case.full_signature: @Test @DirtiesContext // @todo ?? don't know why this is needed, it affects SecurityContextAttributeAuthorizationTest public void testLazy()
test_case.identifier: testLazy
test_case.invocations: assertNotNull getAttributes get getAttributes isEqualTo assertThat getValue isTrue assertThat isEditable get getAttributes isEqualTo assertThat getValue isTrue assertThat isEditable get getAttributes isEqualTo assertThat getValue isTrue assertThat isEditable isTrue assertThat containsLazy getAttributes toDto isFalse assertThat containsLazy getAttributes get getAttributes isTrue assertThat isEditable get getAllAttributes getValue isEqualTo assertThat getValue isTrue assertThat isEditable get getAttributes isTrue assertThat isEditable get getAllAttributes get getValue isEqualTo assertThat getValue isTrue assertThat isEditable
test_case.modifiers: @Test @DirtiesContext // @todo ?? don't know why this is needed, it affects SecurityContextAttributeAuthorizationTest public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testLazy()
focal_class.declarator: log = LoggerFactory.getLogger(AttributeService.class)
focal_class.modifier: private final
focal_class.original_string: private final Logger log = LoggerFactory.getLogger(AttributeService.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: securityContext
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private SecurityContext securityContext;
focal_class.type: SecurityContext
focal_class.var_name: securityContext
focal_class.declarator: expressionService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private FeatureExpressionService expressionService;
focal_class.type: FeatureExpressionService
focal_class.var_name: expressionService
focal_class.file: impl/src/main/java/org/geomajas/internal/layer/feature/AttributeService.java
focal_class.identifier: AttributeService
focal_class.class_method_signature: AttributeService.getAttributes(VectorLayer layer, InternalFeature feature, Object featureBean)
focal_class.full_signature: public InternalFeature getAttributes(VectorLayer layer, InternalFeature feature, Object featureBean)
focal_class.identifier: getAttributes
focal_class.modifiers: public
focal_class.parameters: (VectorLayer layer, InternalFeature feature, Object featureBean)
focal_class.return: InternalFeature
focal_class.signature: InternalFeature getAttributes(VectorLayer layer, InternalFeature feature, Object featureBean)
focal_class.class_method_signature: AttributeService.filterAttributes(String layerId, Map<String, AbstractAttributeInfo> attributeInfo,
  			InternalFeature feature, Map<String, Attribute> featureAttributes)
focal_class.full_signature: private Map<String, Attribute> filterAttributes(String layerId, Map<String, AbstractAttributeInfo> attributeInfo,
  			InternalFeature feature, Map<String, Attribute> featureAttributes)
focal_class.identifier: filterAttributes
focal_class.modifiers: private
focal_class.parameters: (String layerId, Map<String, AbstractAttributeInfo> attributeInfo,
  			InternalFeature feature, Map<String, Attribute> featureAttributes)
focal_class.return: Map<String, Attribute>
focal_class.signature: Map<String, Attribute> filterAttributes(String layerId, Map<String, AbstractAttributeInfo> attributeInfo,
  			InternalFeature feature, Map<String, Attribute> featureAttributes)
focal_class.class_method_signature: AttributeService.setAttributeEditable(Attribute attribute, boolean editable)
focal_class.full_signature: public void setAttributeEditable(Attribute attribute, boolean editable)
focal_class.identifier: setAttributeEditable
focal_class.modifiers: public
focal_class.parameters: (Attribute attribute, boolean editable)
focal_class.return: void
focal_class.signature: void setAttributeEditable(Attribute attribute, boolean editable)
focal_class.class_method_signature: AttributeService.setAttributeEditable(AssociationValue association, boolean editable)
focal_class.full_signature: private void setAttributeEditable(AssociationValue association, boolean editable)
focal_class.identifier: setAttributeEditable
focal_class.modifiers: private
focal_class.parameters: (AssociationValue association, boolean editable)
focal_class.return: void
focal_class.signature: void setAttributeEditable(AssociationValue association, boolean editable)
focal_class.class_method_signature: AttributeService.getRealAttributes(VectorLayer layer, Object featureBean)
focal_class.full_signature: private Map<String, Attribute> getRealAttributes(VectorLayer layer, Object featureBean)
focal_class.identifier: getRealAttributes
focal_class.modifiers: private
focal_class.parameters: (VectorLayer layer, Object featureBean)
focal_class.return: Map<String, Attribute>
focal_class.signature: Map<String, Attribute> getRealAttributes(VectorLayer layer, Object featureBean)
focal_class.class_method_signature: AttributeService.addSyntheticAttributes(InternalFeature feature, Map<String, Attribute> featureAttributes,
  			VectorLayer layer)
focal_class.full_signature: private void addSyntheticAttributes(InternalFeature feature, Map<String, Attribute> featureAttributes,
  			VectorLayer layer)
focal_class.identifier: addSyntheticAttributes
focal_class.modifiers: private
focal_class.parameters: (InternalFeature feature, Map<String, Attribute> featureAttributes,
  			VectorLayer layer)
focal_class.return: void
focal_class.signature: void addSyntheticAttributes(InternalFeature feature, Map<String, Attribute> featureAttributes,
  			VectorLayer layer)
focal_method.body: public InternalFeature getAttributes(VectorLayer layer, InternalFeature feature, Object featureBean)
  			throws LayerException {
  		String layerId = layer.getId();
  
  		Map<String, Attribute> featureAttributes = getRealAttributes(layer, featureBean);
  		feature.setAttributes(featureAttributes); // to allow isAttributeReadable to see full object
  		addSyntheticAttributes(feature, featureAttributes, layer);
  		if (securityContext.isFeatureVisible(layerId, feature)) {
  
  			feature.setAttributes(filterAttributes(layerId, layer.getLayerInfo().getFeatureInfo().getAttributesMap(),
  					feature, featureAttributes));
  
  			feature.setEditable(securityContext.isFeatureUpdateAuthorized(layerId, feature));
  			feature.setDeletable(securityContext.isFeatureDeleteAuthorized(layerId, feature));
  
  			return feature;
  		}
  		return null;
  	}
focal_method.class_method_signature: AttributeService.getAttributes(VectorLayer layer, InternalFeature feature, Object featureBean)
focal_method.full_signature: public InternalFeature getAttributes(VectorLayer layer, InternalFeature feature, Object featureBean)
focal_method.identifier: getAttributes
focal_method.invocations: getId getRealAttributes setAttributes addSyntheticAttributes isFeatureVisible setAttributes filterAttributes getAttributesMap getFeatureInfo getLayerInfo setEditable isFeatureUpdateAuthorized setDeletable isFeatureDeleteAuthorized
focal_method.modifiers: public
focal_method.parameters: (VectorLayer layer, InternalFeature feature, Object featureBean)
focal_method.return: InternalFeature
focal_method.signature: InternalFeature getAttributes(VectorLayer layer, InternalFeature feature, Object featureBean)