Package org.apache.isis.runtimes.dflt.remoting.common.exchange

Examples of org.apache.isis.runtimes.dflt.remoting.common.exchange.SetValueRequest


                        final SetAssociationRequest request = new SetAssociationRequest(getAuthenticationSession(), name, targetReference, associateReference);
                        final SetAssociationResponse response = serverFacade.setAssociation(request);
                        updates = response.getUpdates();
                    } else {
                        final EncodableObjectData val = encoder.encodeAsValue(associateAdapter);
                        final SetValueRequest request = new SetValueRequest(getAuthenticationSession(), name, targetReference, val);
                        final SetValueResponse response = serverFacade.setValue(request);
                        updates = response.getUpdates();
                    }
                    encoder.decode(updates);
                }
View Full Code Here


            }

        });

        IsisContext.getTransactionManager().startTransaction();
        final SetValueRequest request = new SetValueRequest(session, "name", movieData, new DummyEncodeableObjectData("name of movie"));
        final SetValueResponse response = server.setValue(request);
        final ObjectData[] updates = response.getUpdates();
        IsisContext.getTransactionManager().endTransaction();

        nameField.assertField(object, "name of movie");
View Full Code Here

    @Test
    public void testSetAssociationFailsWithNonCurrentTarget() {
        try {
            object.setOptimisticLock(new TestProxyVersion(2));
            final SetValueRequest request = new SetValueRequest(session, "name", movieData, new DummyEncodeableObjectData("name of movie"));
            server.setValue(request);
            fail();
        } catch (final ConcurrencyException expected) {
        }
    }
View Full Code Here

    @Test
    public void testSetAssociationFailsWhenInvisible() {
        nameField.setUpIsVisible(false);
        try {
            final SetValueRequest request = new SetValueRequest(session, "name", movieData, new DummyEncodeableObjectData("name of movie"));
            server.setValue(request);
            fail();
        } catch (final IsisException expected) {
            assertEquals("can't modify field as not visible or editable", expected.getMessage());
        }
View Full Code Here

    @Test
    public void testSetAssociationFailsWhenUnavailable() {
        nameField.setUpIsUnusableFor(object);
        try {
            final SetValueRequest request = new SetValueRequest(session, "name", movieData, new DummyEncodeableObjectData("test data"));
            server.setValue(request);
            fail();
        } catch (final IsisException expected) {
            assertEquals("can't modify field as not visible or editable", expected.getMessage());
        }
View Full Code Here

                                associateReference);
                        final SetAssociationResponse response = serverFacade.setAssociation(request);
                        updates = response.getUpdates();
                    } else {
                        final EncodableObjectData val = encoder.encodeAsValue(associateAdapter);
                        final SetValueRequest request =
                            new SetValueRequest(getAuthenticationSession(), name, targetReference, val);
                        final SetValueResponse response = serverFacade.setValue(request);
                        updates = response.getUpdates();
                    }
                    encoder.decode(updates);
                }
View Full Code Here

            }

        });

        IsisContext.getTransactionManager().startTransaction();
        final SetValueRequest request =
            new SetValueRequest(session, "name", movieData, new DummyEncodeableObjectData("name of movie"));
        final SetValueResponse response = server.setValue(request);
        final ObjectData[] updates = response.getUpdates();
        IsisContext.getTransactionManager().endTransaction();

        nameField.assertField(object, "name of movie");
View Full Code Here

    @Test
    public void testSetAssociationFailsWithNonCurrentTarget() {
        try {
            object.setOptimisticLock(new TestProxyVersion(2));
            final SetValueRequest request =
                new SetValueRequest(session, "name", movieData, new DummyEncodeableObjectData("name of movie"));
            server.setValue(request);
            fail();
        } catch (final ConcurrencyException expected) {
        }
    }
View Full Code Here

    @Test
    public void testSetAssociationFailsWhenInvisible() {
        nameField.setUpIsVisible(false);
        try {
            final SetValueRequest request =
                new SetValueRequest(session, "name", movieData, new DummyEncodeableObjectData("name of movie"));
            server.setValue(request);
            fail();
        } catch (final IsisException expected) {
            assertEquals("can't modify field as not visible or editable", expected.getMessage());
        }
View Full Code Here

    @Test
    public void testSetAssociationFailsWhenUnavailable() {
        nameField.setUpIsUnusableFor(object);
        try {
            final SetValueRequest request =
                new SetValueRequest(session, "name", movieData, new DummyEncodeableObjectData("test data"));
            server.setValue(request);
            fail();
        } catch (final IsisException expected) {
            assertEquals("can't modify field as not visible or editable", expected.getMessage());
        }
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.remoting.common.exchange.SetValueRequest

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.