text: [#propertyDomainEvent]
  = `propertyDomainEvent()`
  
  :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
  :page-partial:
  
  
  Whenever a property of a domain object is interacted with then a domain event will be fired, for each of the various phases (hidden, disabled, validated, executing, executed).
  The `@DomainObject#propertyDomainEvent` attribute allows a common event domain class to be fired for all of the properties of the domain object.
  This can be overridden for any given property using xref:refguide:applib-ant:Property.adoc#domainEvent[`@Property#domainEvent()`].
  
  For example:
  
  [source,java]
  ----
  @DomainObject(
      propertyDomainEvent=ToDoItem.PropertyDomainEventDefault.class
  )
  public class ToDoItem {
      public static class PropertyDomainEventDefault
          extends org.apache.isis.applib.events.domain.PropertyDomainEvent<Object> { }
      ...
  
      @Getter @Setter
      private String description;
  }
  ----
  
  If there is a mixin for the domain object, then this will also honour the domain event.
  For example:
  
  [source,java]
  ----
  @Mixin(method="act")
  public class ToDoItem_priority {
      private final ToDoItem todoItem;
      // constructor omitted
  
      @Action(semantics = SemanticsOf.SAFE)
      @ActionLayout(contributed = Contributed.AS_ASSOCIATION)
      @Property
      public Integer act() { /* ... */ }
  }
  ----
  
  Interactions with the property contributed by this mixin will emit the domain event of the subject (`ToDoItem`).
  
  One small difference between the events emitted by a "regular" property and a contributed property is that the source of the event (as in `event#getSource()` will be different.
  In the former case it will be the domain object instance, in the latter it will be the mixin object instantiated automatically by the framework.
  
  However, the domain object is available using `event#getMixedIn()`.
  Even easier, `event#getSubject()` will always return the domain object (it returns the `#getMixedIn()` if present, otherwise the `#getSource()`.
  
  [NOTE]
  ====
  Property domain events have generic types, with the first generic type indicating the event's source's type, and the second generic type indicating the property return type.
  
  Because an event specified at the class level might have either the domain object or a mixin for the domain object as its source, they should therefore use simply `Object` as their first generic type.
  
  They should _also_ have `Object` for their second generic type, because the return type of the various properties of the domain object will or could be different.
  ====
  