• Adding new functionality while uploading file

  • 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.
 #30182  by mohasinmujawar56
 
I am using OpenKM 6.3 on Windows machine. I want to add new functionality in OpenKM while uploading file. I have added UI but I am not getting from where OpenKM is saving the values in database. I also have created extra fields in database class: 'NodeDocument' table: 'OKM_NODE_DOCUMENT'. I am not getting how a document is getting added in database.
Can any one tell which files or classes needs to be modified?
Please can anyone help me on this?
 #30227  by mohasinmujawar56
 
Now I am able to get the data and store it in database. I also added new column in file browser by adding new column in ExtendedScrollTable.java and filebrowser.java. now I want to display the data which user has entered at the time of uploading document. I have created methods to get and set data in GWTDocument.java, and written the code just like you have written for getting author and other details of the document. Can you please tell me which other classes needs to be modified or to be mapped with GWTDocument.java
 #30244  by jllort
 
Data is already stored into openkm ?
You should take a look at GWTUtil.java where is copyed the Documento to GWTDocument object
 #30246  by mohasinmujawar56
 
Data is getting stored at the time of document uploading. The problem is I am not able to get data from database.
Do we need to modify both GWTDocument copy(...) and Document copy(...) or only one of these two methods. I have modified both methods but still it is not showing data that is stored at the time of document upload.
 #30257  by jllort
 
is quite strange use of openkm. should be better create metadata ( property groups http://wiki.openkm.com/index.php/Proper ... nistration ) and then force all documents to introduce metada with data value. ( for example you can got a report of all documents what do not have metadata field, is quite easy based on OKM_PROPERTY table and OKM_NODE_DOCUMENT ).
Then on GWTUtil you could do some query to get this metadata, for example
OKMPropertyGroup.getInstance().getProperties (String token, String nodePath, String grpName) ( http://doxygen.openkm.com/openkm/d9/d6d ... _1api.html )

This is the most common way to solve it. Also you can add into OKM_NODE_DOCUMENT, but from my point of view this is not the idea of setting document metadata, for it you got PropertyGroups.

Hope this could give you some clue about it.

Other advantage of doing it, is that on future 6.3 release we will include a professional feature what allows to see metadata as an extra filebrows column, without doing anything else, you'll got it on next year release.
 #30288  by mohasinmujawar56
 
There are two fields that needs to be filled by user and only one field needs to be displayed in file browser. But can you please tell me what will be the problem. Why it is not getting copied to GWTDocument.java?
And one more problem when we are adding property group if we left all fields blank then also it allowing to add property group for that particular file or folder. I can show an error if the fields are empty but I am not able to prevent the property group from getting added. Can you please tell me what code to add and in which file it is to be added?
 #30313  by jllort
 
In your logic must consider the case when property group is added or not, in negative case then put "";
I do not see the problem, only I suggest take GWTDocument.java value from property group, not database. I propose simply this change, nothing else. The other logic related with it must be very similar.

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.