Java Doc for Event.java in  » Content-Management-System » dspace » org » dspace » event » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » dspace » org.dspace.event 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.dspace.event.Event

Event
public class Event implements Serializable(Code)
An Event object represents a single action that changed one object in the DSpace data model. An "atomic" action at the application or business-logic API level may spawn many of these events.

This class includes tools to help set and use the contents of the event. Note that it describes DSpace data object types in two ways: by the type identifiers in the Constants class, and also by an Event-specific bitmask (used by its internal filters). All public API calls use the Constants version of the data model types.

Note that the type of the event itself is actually descriptive of the action it performs: ADD, MODIFY, etc. The most significant elements of the event are:


- (Action) Type
- Subject -- DSpace object to which the action applies, e.g. the Collection to which an ADD adds a member.
- Object -- optional, when present it is the other object effected by an action, e.g. the Item ADDed to a Collection by an ADD.
- detail -- a textual summary of what changed, content and its significance varies by the combination of action and subject type.
- timestamp -- exact millisecond timestamp at which event was logged.
version:
   $Revision: 2074 $



Field Summary
final public static  intADD
    
final public static  intCREATE
    
final public static  intDELETE
    
final public static  intEVENT_MASK
    
final public static  intMODIFY
    
final public static  intMODIFY_METADATA
    
final public static  intREMOVE
    
final public static  intSUBJECT_MASK
    

Constructor Summary
public  Event(int eventType, int subjectType, int subjectID, String detail)
     Constructor.
Parameters:
  eventType - action type, e.g.
public  Event(int eventType, int subjectType, int subjectID, int objectType, int objectID, String detail)
     Constructor.
Parameters:
  eventType - action type, e.g.

Method Summary
public  booleanequals(Event other)
     Compare two events.
public  BitSetgetBitSet()
    
public  intgetCurrentUser()
    
public  StringgetDetail()
    
public  intgetDispatcher()
    
public  intgetEventType()
    
public  StringgetEventTypeAsString()
     Get the text name of event (action) type.
public  StringgetExtraLogInfo()
    
public  DSpaceObjectgetObject(Context context)
     Get the DSpace object which is the "object" of an event.
public  intgetObjectID()
    
public  intgetObjectType()
    
public  StringgetObjectTypeAsString()
    
public  DSpaceObjectgetSubject(Context context)
     Syntactic sugar to get the DSpace object which is the "subject" of an event.
public  intgetSubjectID()
    
public  intgetSubjectType()
    
public  StringgetSubjectTypeAsString()
    
public  longgetTimeStamp()
    
public  StringgetTransactionID()
    
public static  intparseEventType(String s)
     Interpret named event type.
public static  intparseObjectType(String s)
     Translate a textual DSpace Object type name into an event subject-type mask.
public  booleanpass(List filters)
    
public  voidsetBitSet(String consumerName)
     Keeps track of which consumers the event has been consumed by.
public  voidsetCurrentUser(int uid)
    
public  voidsetDispatcher(int id)
     Set the identifier of the dispatcher that first processed this event.
public  voidsetExtraLogInfo(String info)
    
public  voidsetTransactionID(String tid)
     Sets value of transactionID element of the event.
public  StringtoString()
    

Field Detail
ADD
final public static int ADD(Code)



CREATE
final public static int CREATE(Code)
Event (Action) types



DELETE
final public static int DELETE(Code)



EVENT_MASK
final public static int EVENT_MASK(Code)



MODIFY
final public static int MODIFY(Code)



MODIFY_METADATA
final public static int MODIFY_METADATA(Code)



REMOVE
final public static int REMOVE(Code)



SUBJECT_MASK
final public static int SUBJECT_MASK(Code)
Index of filter parts in their array:




Constructor Detail
Event
public Event(int eventType, int subjectType, int subjectID, String detail)(Code)
Constructor.
Parameters:
  eventType - action type, e.g. Event.ADD
Parameters:
  subjectType - DSpace Object Type of subject e.g. Constants.ITEM.
Parameters:
  subjectID - database ID of subject instance.
Parameters:
  detail - detail information that depends on context.



Event
public Event(int eventType, int subjectType, int subjectID, int objectType, int objectID, String detail)(Code)
Constructor.
Parameters:
  eventType - action type, e.g. Event.ADD
Parameters:
  subjectType - DSpace Object Type of subject e.g. Constants.ITEM.
Parameters:
  subjectID - database ID of subject instance.
Parameters:
  objectType - DSpace Object Type of object e.g. Constants.BUNDLE.
Parameters:
  objectID - database ID of object instance.
Parameters:
  detail - detail information that depends on context.




Method Detail
equals
public boolean equals(Event other)(Code)
Compare two events. Ignore any difference in the timestamps. Also ignore transactionID since that is not always set initially.
Parameters:
  other - the event to compare this one to



getBitSet
public BitSet getBitSet()(Code)



getCurrentUser
public int getCurrentUser()(Code)



getDetail
public String getDetail()(Code)



getDispatcher
public int getDispatcher()(Code)



getEventType
public int getEventType()(Code)



getEventTypeAsString
public String getEventTypeAsString()(Code)
Get the text name of event (action) type.



getExtraLogInfo
public String getExtraLogInfo()(Code)



getObject
public DSpaceObject getObject(Context context) throws SQLException(Code)
Get the DSpace object which is the "object" of an event.



getObjectID
public int getObjectID()(Code)



getObjectType
public int getObjectType()(Code)



getObjectTypeAsString
public String getObjectTypeAsString()(Code)



getSubject
public DSpaceObject getSubject(Context context) throws SQLException(Code)
Syntactic sugar to get the DSpace object which is the "subject" of an event.



getSubjectID
public int getSubjectID()(Code)



getSubjectType
public int getSubjectType()(Code)



getSubjectTypeAsString
public String getSubjectTypeAsString()(Code)



getTimeStamp
public long getTimeStamp()(Code)



getTransactionID
public String getTransactionID()(Code)



parseEventType
public static int parseEventType(String s)(Code)
Interpret named event type.
Parameters:
  text - name of event type.



parseObjectType
public static int parseObjectType(String s)(Code)
Translate a textual DSpace Object type name into an event subject-type mask. NOTE: This returns a BIT-MASK, not a numeric type value; the mask is only used within the event system.
Parameters:
  s - text name of object type.



pass
public boolean pass(List filters)(Code)

Parameters:
  filters - list of filter masks; each one is an Array of two ints.



setBitSet
public void setBitSet(String consumerName)(Code)
Keeps track of which consumers the event has been consumed by. Should be called by a dispatcher when calling consume(Context ctx, String name, Event event) on an event.
Parameters:
  consumerName -



setCurrentUser
public void setCurrentUser(int uid)(Code)



setDispatcher
public void setDispatcher(int id)(Code)
Set the identifier of the dispatcher that first processed this event.
Parameters:
  id - the unique (hash code) value characteristic of the dispatcher.



setExtraLogInfo
public void setExtraLogInfo(String info)(Code)



setTransactionID
public void setTransactionID(String tid)(Code)
Sets value of transactionID element of the event.
Parameters:
  tid - new value of transactionID.



toString
public String toString()(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.