Package org.jasig.portal.events.support

Examples of org.jasig.portal.events.support.ChannelLayoutPortalEvent


  private IStatsRecorder recorder;

  public void handleEvent(final PortalEvent event) {
    final Class<? extends PortalEvent> eventClass = event.getClass();
    if (eventClass.equals(ChannelAddedToLayoutPortalEvent.class)) {
      final ChannelLayoutPortalEvent portalEvent = (ChannelLayoutPortalEvent) event;
      this.recorder.recordChannelAddedToLayout(portalEvent.getPerson(),
          portalEvent.getProfile(), portalEvent
              .getChannelDescription());
    } else if (eventClass
        .equals(ChannelInstanciatedInLayoutPortalEvent.class)) {
      final ChannelLayoutPortalEvent portalEvent = (ChannelLayoutPortalEvent) event;
      this.recorder.recordChannelInstantiated(portalEvent.getPerson(),
          portalEvent.getProfile(), portalEvent
              .getChannelDescription());
    } else if (eventClass.equals(ChannelMovedInLayoutPortalEvent.class)) {
      final ChannelLayoutPortalEvent portalEvent = (ChannelLayoutPortalEvent) event;
      this.recorder.recordChannelMovedInLayout(portalEvent.getPerson(),
          portalEvent.getProfile(), portalEvent
              .getChannelDescription());
    } else if (eventClass.equals(ChannelRemovedFromLayoutPortalEvent.class)) {
      final ChannelLayoutPortalEvent portalEvent = (ChannelLayoutPortalEvent) event;
      this.recorder.recordChannelRemovedFromLayout(portalEvent
          .getPerson(), portalEvent.getProfile(), portalEvent
          .getChannelDescription());
    } else if (eventClass.equals(ChannelRenderedInLayoutPortalEvent.class)) {
      final ChannelLayoutPortalEvent portalEvent = (ChannelLayoutPortalEvent) event;
      this.recorder.recordChannelRendered(portalEvent.getPerson(),
          portalEvent.getProfile(), portalEvent
              .getChannelDescription());
    } else if (eventClass.equals(ChannelTargetedInLayoutPortalEvent.class)) {
      final ChannelLayoutPortalEvent portalEvent = (ChannelLayoutPortalEvent) event;
      this.recorder.recordChannelTargeted(portalEvent.getPerson(),
          portalEvent.getProfile(), portalEvent
              .getChannelDescription());
    } else if (eventClass.equals(ChannelUpdatedInLayoutPortalEvent.class)) {
      final ChannelLayoutPortalEvent portalEvent = (ChannelLayoutPortalEvent) event;
      this.recorder.recordChannelUpdatedInLayout(portalEvent.getPerson(),
          portalEvent.getProfile(), portalEvent
              .getChannelDescription());
    } else if (eventClass
        .equals(ModifiedChannelDefinitionPortalEvent.class)) {
      final ChannelPortalEvent portalEvent = (ChannelPortalEvent) event;
      this.recorder.recordChannelDefinitionModified(portalEvent
          .getPerson(), portalEvent.getChannelDefinition());
    } else if (eventClass
        .equals(PublishedChannelDefinitionPortalEvent.class)) {
      final ChannelPortalEvent portalEvent = (ChannelPortalEvent) event;
      this.recorder.recordChannelDefinitionPublished(portalEvent
          .getPerson(), portalEvent.getChannelDefinition());
    } else if (eventClass.equals(RemovedChannelDefinitionPortalEvent.class)) {
      final ChannelPortalEvent portalEvent = (ChannelPortalEvent) event;
      this.recorder.recordChannelDefinitionRemoved(portalEvent
          .getPerson(), portalEvent.getChannelDefinition());
    } else if (eventClass.equals(UserLoggedOutPortalEvent.class)) {
      this.recorder.recordLogout(event.getPerson());
    } else if (eventClass.equals(UserAddedFolderToLayoutPortalEvent.class)) {
      final LayoutPortalEvent portalEvent = (LayoutPortalEvent) event;
      this.recorder.recordFolderAddedToLayout(portalEvent.getPerson(),
          portalEvent.getProfile(), portalEvent.getFolder());
    } else if (eventClass.equals(UserLoggedInPortalEvent.class)) {
      this.recorder.recordLogin(event.getPerson());
    } else if (eventClass.equals(UserMovedFolderInLayoutPortalEvent.class)) {
      final LayoutPortalEvent portalEvent = (LayoutPortalEvent) event;
      this.recorder.recordFolderMovedInLayout(portalEvent.getPerson(),
          portalEvent.getProfile(), portalEvent.getFolder());
    } else if (eventClass
        .equals(UserRemovedFolderFromLayoutPortalEvent.class)) {
      final LayoutPortalEvent portalEvent = (LayoutPortalEvent) event;
      this.recorder.recordFolderRemovedFromLayout(
          portalEvent.getPerson(), portalEvent.getProfile(),
          portalEvent.getFolder());
    } else if (eventClass.equals(UserSessionCreatedPortalEvent.class)) {
      this.recorder.recordSessionCreated(event.getPerson());
    } else if (eventClass.equals(UserSessionDestroyedPortalEvent.class)) {
      this.recorder.recordSessionDestroyed(event.getPerson());
    } else if (eventClass
        .equals(UserUpdatedFolderInLayoutPortalEvent.class)) {
      final LayoutPortalEvent portalEvent = (LayoutPortalEvent) event;
      this.recorder.recordFolderUpdatedInLayout(portalEvent.getPerson(),
          portalEvent.getProfile(), portalEvent.getFolder());
    }
  }
View Full Code Here

TOP

Related Classes of org.jasig.portal.events.support.ChannelLayoutPortalEvent

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.