Package com.volantis.mcs.interaction

Examples of com.volantis.mcs.interaction.Proxy


        wilmaProxy.setReadWriteState(ReadWriteState.READ_ONLY);
        assertOperationFails("Set model should fail when bean is RO",
                wilmaProxy.prepareSetModelObjectOperation(new Person()));

        // Opaque proxy operations
        Proxy opaqueProxy = wilmaProxy.getPropertyProxy(Person.FIRST_NAME);
        opaqueProxy.setReadWriteState(ReadWriteState.READ_ONLY);
        assertOperationFails("Set model should fail when property is RO",
                opaqueProxy.prepareSetModelObjectOperation("Pebbles"));
    }
View Full Code Here


        ModelDescriptor descriptor = Descriptors.MODEL_DESCRIPTOR;
        InteractionFactory factory = InteractionFactory.getDefaultInstance();
        InteractionModel interactionModel =
                factory.createInteractionModel(descriptor);

        Proxy proxy = interactionModel.createProxyForModelObject(object);
        return proxy;
    }
View Full Code Here

    public void testCopying() {

        Address address = createFlintStoneAddress();
        Person person = createFredFlintstone(address);

        Proxy proxy = createProxy(person);

        Person personCopy = (Person) proxy.copyModelObject();
        assertEquals("age", person.getAge(), personCopy.getAge());
        assertSame("firstName", person.getFirstName(), personCopy.getFirstName());
        assertSame("lastName", person.getLastName(), personCopy.getLastName());

        Address addressCopy = personCopy.getAddress();
View Full Code Here

            Step step = path.getStep(s);
            proxy = (AbstractProxy) proxy.traverse(step, enclosing, proxies);

            // For base proxies, get the concrete proxy if possible
            if (proxy instanceof BaseProxy) {
                Proxy concreteProxy = ((BaseProxy) proxy).getConcreteProxy();
                if (concreteProxy != null) {
                    proxy = (AbstractProxy) concreteProxy;
                }
            }
View Full Code Here

        } else if (readWriteState == ReadWriteState.READ_WRITE) {
            // Explicitly set value
            readOnly = false;
        } else {
            // Inherit parent value
            Proxy parent = getParentProxy();
            if (parent != null) {
                readOnly = parent.isReadOnly();
            } else {
                // Default value is false
                readOnly = false;
            }
        }
View Full Code Here

            BeanClassDescriptor descriptor = proxy.getBeanClassDescriptor();
            List properties = descriptor.getPropertyDescriptors();
            for (int i = 0; i < properties.size(); i++) {
                PropertyDescriptor property = (PropertyDescriptor)
                        properties.get(i);
                Proxy child = proxy.getPropertyProxy(property.getIdentifier());
                propagate(child);
            }
        }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.interaction.Proxy

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.