Class AspectWatch<T extends ComplexEntity>

java.lang.Object
mc.core.system.base.BaseBean
mc.core.domain.base.dobj.AbstractAspect<T>
mc.core.domain.base.aspect.AspectWatch<T>

public class AspectWatch<T extends ComplexEntity> extends AbstractAspect<T>
  • Constructor Details

    • AspectWatch

      public AspectWatch()
  • Method Details

    • add

      public void add(T entity, Principal principal, List<Watch.EventType> eventTypes, Locale locale) throws ApplicationException
      add watch recursive
      Parameters:
      entity - mandatory
      principal - mandatory
      eventTypes - mandatory, if empty list do nothing
      locale - optional, should be given for locale dependent eventTypes
      Throws:
      ApplicationException
    • add

      public void add(T entity, Principal principal, List<Watch.EventType> eventTypes, Locale locale, boolean recursive) throws ApplicationException
      add watch recursive or flat
      Parameters:
      entity - mandatory
      principal - mandatory
      eventTypes - mandatory, if empty list do nothing
      locale - optional, should be given for locale dependent eventTypes
      recursive - optional, set watch only on given entity, or recursive on children (if any)
      Throws:
      ApplicationException
    • delete

      public void delete(Watch watch) throws ApplicationException
      Throws:
      ApplicationException
    • deleteSync

      public void deleteSync(Watch watch)
      deletes this watch and sends event for watched entity. Does not delete watches on children of entity.