Package org.openbravo.event
Class ExternalBusinessPartnerAddressMappingEventHandler
- java.lang.Object
-
- org.openbravo.client.kernel.event.EntityPersistenceEventObserver
-
- org.openbravo.event.ExternalBusinessPartnerAddressMappingEventHandler
-
public class ExternalBusinessPartnerAddressMappingEventHandler extends EntityPersistenceEventObserver
Ensures the following rules:- When using Customer and Address Endpoint Configuration, only one Address Mapping is allowed
- When Creating an Address Mapping, Country property should always be filled
- When Using Customer and Address Endpoint Configuration, if an Address Mapping property is assigned it should always be marked as mandatory
-
-
Constructor Summary
Constructors Constructor Description ExternalBusinessPartnerAddressMappingEventHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Entity[]
getObservedEntities()
Must be implemented by subclass to signal whichEntity
types are observed.void
onSave(EntityNewEvent event)
void
onUpdate(EntityUpdateEvent event)
-
Methods inherited from class org.openbravo.client.kernel.event.EntityPersistenceEventObserver
isValidEvent
-
-
-
-
Method Detail
-
getObservedEntities
protected Entity[] getObservedEntities()
Description copied from class:EntityPersistenceEventObserver
Must be implemented by subclass to signal whichEntity
types are observed.- Specified by:
getObservedEntities
in classEntityPersistenceEventObserver
- Returns:
- the array of entity instances to observe.
- See Also:
EntityPersistenceEventObserver.isValidEvent(EntityPersistenceEvent)
-
onUpdate
public void onUpdate(@Observes EntityUpdateEvent event)
-
onSave
public void onSave(@Observes EntityNewEvent event)
-
-