Examples of MapAttributes


Examples of com.volantis.mcs.protocols.widgets.attributes.MapAttributes

            calculatedImagePath = "/"+ GEN_IMAGE_PATH;
        } else {
            calculatedImagePath = "/"+ pageBase+"/"+GEN_IMAGE_PATH;
        }
       
        MapAttributes mapAttributes = (MapAttributes) attributes;
        mapAttributes.setImageAttributes(createErrorImage(protocol));
       
        if (attributes.getId() == null) {
            attributes.setId(protocol.getMarinerPageContext()
                    .generateUniqueFCID());
        }
View Full Code Here

Examples of com.volantis.mcs.protocols.widgets.attributes.MapAttributes

        if (!this.containsMapView) {
            throw new ProtocolException("Missed widget:map-view element.");
        }
        this.containsMapView = false;
       
        MapAttributes mapAttributes = (MapAttributes) attributes;
       
        Styles styles = mapAttributes.getStyles();
       
        String mapStyle = "map";
         
       
        if (styles.getPropertyValues().getComputedValue(
            StylePropertyDetails.MCS_MAP_STYLE) == StyleKeywords.PHOTO) {
            mapStyle = "photo";
        } else if (styles.getPropertyValues().getComputedValue(
            StylePropertyDetails.MCS_MAP_STYLE) == StyleKeywords.HYBRID) {
            logger.warn("property-not-supported-yet",
                    new Object[]{"hybrid", "map"});
        }
       
        String pageBase = protocol.getMarinerPageContext().getVolantisBean().getPageBase();
        if(pageBase.length()>0){
            pageBase = "/"+pageBase;
        }

        StringBuffer scriptBuffer = new StringBuffer();
        scriptBuffer.append("Widget.register('").append(attributes.getId())
                .append("', new Widget.GoogleMap('").append(attributes.getId())
                .append("',{cacheOn : true,")
                .append("mode : '").append(mapStyle).append("', ")
                .append(prepareICSConfig(mapAttributes.getImageAttributes()))
                .append(",imageSize : ").append(StringConvertor.valueOf(this.imageSizePx))
                .append(",pageBase : '").append(pageBase).append("'")
                .append(getInitialLocation(mapAttributes)).append("},{")
                .append(createInitializationList())
                .append("}));");
View Full Code Here

Examples of com.volantis.mcs.protocols.widgets.attributes.MapAttributes

        LocalizationFactory.createExceptionLocalizer(MapElement.class);
   
   
    public MapElement(XDIMEContextInternal context){
        super(WidgetElements.MAP, context);
        protocolAttributes = new MapAttributes();
    }
View Full Code Here

Examples of org.gwtoolbox.commons.collections.client.attributes.MapAttributes

    public void initialize(A annotation) {
    }

    public void initialize(Map<String, Object> annotationAttributes) {
        this.attributes = new MapAttributes(annotationAttributes);
    }
View Full Code Here

Examples of org.springframework.metadata.support.MapAttributes

public class CommonsAttributesTransactionAttributeSourceTests extends TestCase {

  public void testNullOrEmpty() throws Exception {
    Method method = ITestBean.class.getMethod("getAge", (Class[]) null);

    MapAttributes mar = new MapAttributes();
    mar.register(method, null);
    AttributesTransactionAttributeSource atas = new AttributesTransactionAttributeSource(mar);
    assertNull(atas.getTransactionAttribute(method, null));

    mar.register(method, new Object[0]);
    assertNull(atas.getTransactionAttribute(method, null));
    // Try again in case of caching
    assertNull(atas.getTransactionAttribute(method, null));
  }
View Full Code Here

Examples of org.springframework.metadata.support.MapAttributes

  public void testSingleTransactionAttribute() throws Exception {
    Method method = ITestBean.class.getMethod("getAge", (Class[]) null);

    TransactionAttribute txAtt = new DefaultTransactionAttribute();

    MapAttributes ma = new MapAttributes();
    ma.register(method, new Object[]{txAtt});
    AttributesTransactionAttributeSource atas = new AttributesTransactionAttributeSource(ma);
    TransactionAttribute actual = atas.getTransactionAttribute(method, method.getDeclaringClass());
    assertEquals(txAtt, actual);
    // Check that the same attribute comes back if we ask twice
    assertSame(txAtt, atas.getTransactionAttribute(method, method.getDeclaringClass()));
View Full Code Here

Examples of org.springframework.metadata.support.MapAttributes

  public void testTransactionAttributeAmongOthers() throws Exception {
    Method method = TestBean.class.getMethod("getAge", (Class[]) null);

    TransactionAttribute txAtt = new DefaultTransactionAttribute();

    MapAttributes ma = new MapAttributes();
    AttributesTransactionAttributeSource atas = new AttributesTransactionAttributeSource(ma);
    ma.register(method, new Object[]{new Object(), "", txAtt, "er"});
    TransactionAttribute actual = atas.getTransactionAttribute(method, method.getDeclaringClass());
    assertEquals(txAtt, actual);
    assertSame(txAtt, atas.getTransactionAttribute(method, method.getDeclaringClass()));
  }
View Full Code Here

Examples of org.springframework.metadata.support.MapAttributes

    Method method2 = TestBeanWithOverloadedMethod.class.getMethod("getAge", new Class[]{int.class});

    TransactionAttribute txAtt1 = new DefaultTransactionAttribute();
    TransactionAttribute txAtt2 = new DefaultTransactionAttribute(TransactionDefinition.PROPAGATION_NEVER);

    MapAttributes ma = new MapAttributes();
    AttributesTransactionAttributeSource atas = new AttributesTransactionAttributeSource(ma);
    ma.register(method1, new Object[]{new Object(), "", txAtt1, "er"});
    ma.register(method2, new Object[]{txAtt2});

    TransactionAttribute actual = atas.getTransactionAttribute(method1, TestBeanWithOverloadedMethod.class);
    assertEquals(txAtt1, actual);
    assertSame(txAtt1, atas.getTransactionAttribute(method1, method1.getDeclaringClass()));
View Full Code Here

Examples of org.springframework.metadata.support.MapAttributes

    Method classMethod = TestBean.class.getMethod("getAge", (Class[]) null);
    Method interfaceMethod = ITestBean.class.getMethod("getAge", (Class[]) null);

    TransactionAttribute txAtt = new DefaultTransactionAttribute();

    MapAttributes ma = new MapAttributes();
    AttributesTransactionAttributeSource atas = new AttributesTransactionAttributeSource(ma);
    ma.register(classMethod, new Object[]{new Object(), "", txAtt, "er"});
    // Target class implements ITestBean
    TransactionAttribute actual = atas.getTransactionAttribute(interfaceMethod, TestBean.class);
    assertEquals(txAtt, actual);
  }
View Full Code Here

Examples of org.springframework.metadata.support.MapAttributes

  public void testTransactionAttributeDeclaredOnInterfaceMethodOnly() throws Exception {
    Method interfaceMethod = ITestBean.class.getMethod("getAge", (Class[]) null);

    TransactionAttribute txAtt = new DefaultTransactionAttribute();

    MapAttributes ma = new MapAttributes();
    AttributesTransactionAttributeSource atas = new AttributesTransactionAttributeSource(ma);
    ma.register(interfaceMethod, new Object[]{new Object(), "", txAtt, "er"});
    // Target class implements ITestBean
    TransactionAttribute actual = atas.getTransactionAttribute(interfaceMethod, TestBean.class);
    assertEquals(txAtt, actual);
  }
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.