jahiaevent.java

来自「java 写的一个新闻发布系统」· Java 代码 · 共 124 行

JAVA
124
字号
////                                   ____.//                       __/\ ______|    |__/\.     _______//            __   .____|    |       \   |    +----+       \//    _______|  /--|    |    |    -   \  _    |    :    -   \_________//   \\______: :---|    :    :           |    :    |         \________>//           |__\---\_____________:______:    :____|____:_____\//                                      /_____|////                 . . . i n   j a h i a   w e   t r u s t . . .//////  JahiaEvent//  EV      12.01.2001//  SH      12.12.2001 Adding JahiaData reference, only for reasons of speed//  because in some cases we were recreating it instead of using the already//  existing one.////  getParams()//  getObject()//  getEventTime()//package org.jahia.data.events;import java.util.*;                         // EventObjectimport org.jahia.services.events.*;     // JahiaEventGeneratorServiceimport org.jahia.services.usermanager.JahiaUser;import org.jahia.params.*;              // ParamBeanimport org.jahia.data.JahiaData;import org.jahia.services.pages.JahiaPage;public class JahiaEvent extends EventObject{    private     ParamBean   jParams;    private     Object      theObj;    private     long        eventTime;    private     JahiaData   jData; // this may be null if no JahiaData is                                   // available.    /***        * constructor        * composes automatically the time when the event was triggered        *        * @param        source              the object that generated this event        * @param        jParams             a ParamBean object (with request and response)        * @param        jData               a JahiaData object, may be null if none is available        * @param        objectID            the object id targeted by this event (i.e. the field id)        *        */    public JahiaEvent(  Object      source,                        ParamBean   jParams,                        JahiaData   jData,                        Object      theObj )    {        super( source );        this.jParams    = jParams;        this.eventTime  = (new Date()).getTime();        this.theObj     = theObj;        this.jData      = jData;    } // end JahiaEvent    /***        * constructor        * composes automatically the time when the event was triggered        *        * @param        source              the object that generated this event        * @param        jParams             a ParamBean object (with request and response)        * @param        objectID            the object id targeted by this event (i.e. the field id)        *        */    public JahiaEvent(  Object      source,                        ParamBean   jParams,                        Object      theObj )    {        super( source );        this.jParams    = jParams;        this.eventTime  = (new Date()).getTime();        this.theObj     = theObj;        this.jData      = null;    } // end JahiaEvent    /***        * constructor        * composes automatically the time when the event was triggered        * context-independant (does not include the parambean object)        *        * @param        source              the object that generated this event        * @param        objectID            the object id targeted by this event (i.e. the field id)        *        */    public JahiaEvent(  Object      source,                        Object      theObj )    {        super( source );        this.eventTime  = (new Date()).getTime();        this.theObj     = theObj;        this.jParams    = null;        this.jData      = null;    } // end JahiaEvent    /***        * accessor methods        *        */    public  ParamBean   getParams()     {   return jParams;     }    public  Object      getObject()     {   return theObj;      }    public  long        getEventTime()  {   return eventTime;   }    public  JahiaData   getJahiaData()  {   return jData;       }    // end accessor methods} // end JahiaEvent

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?