org.olat.core.logging.activity
Enum CrudAction

java.lang.Object
  extended by java.lang.Enum<CrudAction>
      extended by org.olat.core.logging.activity.CrudAction
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<CrudAction>

public enum CrudAction
extends java.lang.Enum<CrudAction>

enum representing the four CRUD types which are stored with each log entry:

Note that it's not always easy to map log messages to one of the four crud actions - if you find it hard it is always an idea to fall back to the default 'retrieve'

NOTE: Make sure that the initial of any two CrudActions are different! The initial is what is stored to the DB!

Initial Date: 20.10.2009

Author:
Stefan

Enum Constant Summary
create
          a resource is created
delete
          a resource is deleted
exit
          an exit from viewing/editing/etc a resource
retrieve
          a resource is retrieved/read - this includes open/close
update
          a resource is updated
 
Method Summary
static CrudAction valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static CrudAction[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

create

public static final CrudAction create
a resource is created


retrieve

public static final CrudAction retrieve
a resource is retrieved/read - this includes open/close


update

public static final CrudAction update
a resource is updated


delete

public static final CrudAction delete
a resource is deleted


exit

public static final CrudAction exit
an exit from viewing/editing/etc a resource

Method Detail

values

public static CrudAction[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CrudAction c : CrudAction.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CrudAction valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null