Difference between revisions of "Scripting - OpenKM 5.1"

From OpenKM Documentation
Jump to: navigation, search
Line 1: Line 1:
 
Scripting is an advanced feature - some esperimental - that enables administrator to execute some scripts in folders fired each time has been some events there ( for example uploading documents ). It could be useful for making automatic operations in all repository.
 
Scripting is an advanced feature - some esperimental - that enables administrator to execute some scripts in folders fired each time has been some events there ( for example uploading documents ). It could be useful for making automatic operations in all repository.
 
  
 
<center>[[File:Okm_admin_003.jpeg|720px]]</center>
 
<center>[[File:Okm_admin_003.jpeg|720px]]</center>
 
  
 
== Variables used ==
 
== Variables used ==
'''java.lang.String eventType''': says the event that has fired the script
+
'''java.lang.String eventType''': says the event that has fired the script. See below for event types.
 
 
'''javax.jcr.Session session''': users session that executes the script
 
 
 
'''javax.jcr.Node eventNode''': node that causes the event
 
 
 
'''javax.jcr.Node scriptNode''': node where is stored the script
 
 
 
 
 
== Events that firing scripts ==
 
 
 
'''DOCUMENT'''
 
CREATE_DOCUMENT
 
 
 
DELETE_DOCUMENT
 
 
 
SET_DOCUMENT_CONTENT
 
 
 
SET_DOCUMENT_PROPERTIES
 
 
 
CHECKOUT_DOCUMENT
 
 
 
CANCEL_CHECKOUT_DOCUMENT
 
 
 
CHECKIN_DOCUMENT
 
 
 
LOCK_DOCUMENT
 
 
 
UNLOCK_DOCUMENT
 
 
 
PURGE_DOCUMENT
 
 
 
 
 
'''FOLDER'''
 
CREATE_FOLDER
 
 
 
DELETE_FOLDER
 
 
 
PURGE_FOLDER
 
 
 
 
 
'''MAIL'''
 
CREATE_MAIL
 
 
 
DELETE_MAIL
 
  
PURGE_MAIL
+
'''javax.jcr.Session session''': users session that executes the script.
  
 +
'''javax.jcr.Node eventNode''': node that causes the event.
  
'''PROPERTIES'''
+
'''javax.jcr.Node scriptNode''': node where is stored the script.
ADD_CATEGORY
 
  
REMOVE_CATEGORY
+
== Events types ==
 +
=== Document related ===
 +
* CREATE_DOCUMENT
 +
* DELETE_DOCUMENT
 +
* SET_DOCUMENT_CONTENT
 +
* SET_DOCUMENT_PROPERTIES
 +
* CHECKOUT_DOCUMENT
 +
* CANCEL_CHECKOUT_DOCUMENT
 +
* CHECKIN_DOCUMENT
 +
* LOCK_DOCUMENT
 +
* UNLOCK_DOCUMENT
 +
* PURGE_DOCUMENT
  
ADD_KEYWORD
+
=== Folder related ===
 +
* CREATE_FOLDER
 +
* DELETE_FOLDER
 +
* PURGE_FOLDER
  
REMOVE_KEYWORD
+
=== Mail related ===
 +
* CREATE_MAIL
 +
* DELETE_MAIL
 +
* PURGE_MAIL
  
 +
=== Property related ===
 +
* ADD_CATEGORY
 +
* REMOVE_CATEGORY
 +
* ADD_KEYWORD
 +
* REMOVE_KEYWORD
  
 
[[Category: Administration Guide]]
 
[[Category: Administration Guide]]

Revision as of 17:40, 9 March 2010

Scripting is an advanced feature - some esperimental - that enables administrator to execute some scripts in folders fired each time has been some events there ( for example uploading documents ). It could be useful for making automatic operations in all repository.

Okm admin 003.jpeg

Variables used

java.lang.String eventType: says the event that has fired the script. See below for event types.

javax.jcr.Session session: users session that executes the script.

javax.jcr.Node eventNode: node that causes the event.

javax.jcr.Node scriptNode: node where is stored the script.

Events types

Document related

  • CREATE_DOCUMENT
  • DELETE_DOCUMENT
  • SET_DOCUMENT_CONTENT
  • SET_DOCUMENT_PROPERTIES
  • CHECKOUT_DOCUMENT
  • CANCEL_CHECKOUT_DOCUMENT
  • CHECKIN_DOCUMENT
  • LOCK_DOCUMENT
  • UNLOCK_DOCUMENT
  • PURGE_DOCUMENT

Folder related

  • CREATE_FOLDER
  • DELETE_FOLDER
  • PURGE_FOLDER

Mail related

  • CREATE_MAIL
  • DELETE_MAIL
  • PURGE_MAIL

Property related

  • ADD_CATEGORY
  • REMOVE_CATEGORY
  • ADD_KEYWORD
  • REMOVE_KEYWORD