Examples of DomainEvent


Examples of de.novanic.eventservice.client.event.DomainEvent

     * Adds an event for a domain to the user.
     * @param aDomain domain
     * @param anEvent event
     */
    public void addEvent(Domain aDomain, Event anEvent) {
        DomainEvent theDomainEvent = new DefaultDomainEvent(anEvent, aDomain);
        myEvents.add(theDomainEvent);
        notifyEventListening();
    }
View Full Code Here

Examples of de.novanic.eventservice.client.event.DomainEvent

     *                   The maximum amount of events prevents the logic from endless seeking of events (for example when more events are concurrently added than this logic/thread can process).
     * @return all events according to the user
     */
    public List<DomainEvent> retrieveEvents(int aMaxEvents) {
        List<DomainEvent> theEventList = new ArrayList<DomainEvent>(myEvents.size());
        DomainEvent theEvent;
        for(int i = 0; i < aMaxEvents && (theEvent = myEvents.poll()) != null; i++) {
            theEventList.add(theEvent);
        }
        return theEventList;
    }
View Full Code Here

Examples of de.novanic.eventservice.client.event.DomainEvent

        mockInitRootPanel();
        when(RootPanel.getBodyElement()).thenReturn(theElementMock);

        GWTMockUtilities.restore();

        DomainEvent theDomainEvent = new DummyDomainEvent();
        final String theSerializedEvent = "[4,3,2,1,[\"de.novanic.eventservice.client.event.DefaultDomainEvent/3924906731\",\"de.novanic.eventservice.client.event.domain.DefaultDomain/240262385\",\"test_domain\",null],0,5]";

        SerializationStreamReader theSerializationStreamReaderMock = mock(SerializationStreamReader.class);
        when(theSerializationStreamReaderMock.readObject()).thenReturn(theDomainEvent);
View Full Code Here

Examples of de.novanic.eventservice.client.event.DomainEvent

        EventNotificationTestHandler theEventNotification = new EventNotificationTestHandler();

        final String theSerializedEvent = "[4,3,2,1,[\"de.novanic.eventservice.client.event.DefaultDomainEvent/3924906731\",\"de.novanic.eventservice.client.event.domain.DefaultDomain/240262385\",\"test_domain\",null],0,5]";

        DomainEvent theDomainEvent = new DummyDomainEvent();

        SerializationStreamReader theSerializationStreamReaderMock = mock(SerializationStreamReader.class);
        when(theSerializationStreamReaderMock.readObject()).thenReturn(theDomainEvent);

        mockInitSerializationStreamFactory(theSerializationStreamReaderMock, theSerializedEvent);
View Full Code Here

Examples of de.novanic.eventservice.client.event.DomainEvent

        EventNotificationTestHandler theEventNotification = new EventNotificationTestHandler();

        final String theSerializedEvent = "[4,3,2,1,[\"de.novanic.eventservice.client.event.DefaultDomainEvent/3924906731\",\"de.novanic.eventservice.client.event.domain.DefaultDomain/240262385\",\"test_domain\",null],0,5]";

        DomainEvent theDomainEvent = new DummyDomainEvent();

        SerializationStreamReader theSerializationStreamReaderMock = mock(SerializationStreamReader.class);
        when(theSerializationStreamReaderMock.readObject()).thenReturn(theDomainEvent);

        mockInitSerializationStreamFactory(theSerializationStreamReaderMock, theSerializedEvent);
View Full Code Here

Examples of org.apache.cayenne.configuration.event.DomainEvent

        Map properties = domain.getProperties();
        Object oldValue = properties.get(property);
        if (!Util.nullSafeEquals(value, oldValue)) {
            properties.put(property, value);

            DomainEvent e = new DomainEvent(this, domain);
            projectController.fireDomainEvent(e);
        }
    }
View Full Code Here

Examples of org.apache.cayenne.configuration.event.DomainEvent

            throw new ValidationException("Enter name for DataDomain");
        }

        Preferences prefs = projectController.getPreferenceForDataDomain();

        DomainEvent e = new DomainEvent(
                this,
                dataChannelDescriptor,
                dataChannelDescriptor.getName());
        dataChannelDescriptor.setName(newName);
View Full Code Here

Examples of org.apache.cayenne.configuration.event.DomainEvent

            logObj.warn("domain properties BEFORE: " + domain.getProperties());
            model.storeProperties(domain.getProperties());

            logObj.warn("domain properties: " + domain.getProperties());

            eventController.fireDomainEvent(new DomainEvent(this, domain));
        }

        shutdown();
    }
View Full Code Here

Examples of org.apache.cayenne.configuration.event.DomainEvent

public class DomainEventTest extends TestCase {

    public void testConstructor1() throws Exception {
      Object src = new Object();
      DataChannelDescriptor d = new DataChannelDescriptor();
      DomainEvent e = new DomainEvent(src, d);
     
      assertSame(src, e.getSource());
      assertSame(d, e.getDomain());
    }
View Full Code Here

Examples of org.apache.cayenne.configuration.event.DomainEvent

    }
   
    public void testConstructor2() throws Exception  {
      Object src = new Object();
      DataChannelDescriptor d = new DataChannelDescriptor();
      DomainEvent e = new DomainEvent(src, d, "oldname");
     
      assertSame(src, e.getSource());
      assertSame(d, e.getDomain());
      assertEquals("oldname", e.getOldName());
    }
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.