• INSERT into openkm Database tables from java codes

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #46446  by mamad
 
Hi guys,
According to what I have read in openKM documentation, we cant insert into our own tables from java codes(and only can exceute UPDATE,DELETE and SELECT queries), i mean we can execute Inserting queries only by executing them in "Database query" menu in openKM or do it straightly inside Mysql workbench.
Is there any any way to execute INSERT queries in our codes ?
 #46471  by mamad
 
thanks it works for non-GWT classes.
But what about GWT based classes ? i dont see any example of using INSERT query in documentation.
Please consider that i know about Administration > Database query but i want to do INSERTING in my code (for some dynamic purposes)
 #46477  by jllort
 
GWT classes always interact with the application across Servlet, for example take a look at these classes:

com.openkm.servlet.frontend.DocumentServlet -> Where the servlet makes calls to the core
com.openkm.frontend.client.service.OKMDocumentService -> interface defininition
com.openkm.frontend.client.service.OKMDocumentServiceAsync -> where GWT classes make call for accessing the servlet exposed methods
 #46487  by mamad
 
well, i read this classes but would you please share me a simple example about how to use this classes ? Is there any part in openkm-CE documentation that has some practical examples about using Servlets ?
 #46495  by jllort
 
Servlets are exposed with a declaration into web.xml , take a look into. This is a JAVA standard architecture, not an OpenKM exclusive one, basically, we do not have documentation about something that you should previously know about how building JAVA applications with Servlets. This might try to give you some clues about how doing it. We have a Servlet named com.openkm.servlet.frontend.TestServlet I suggest take it as a reference and create your own.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.