How to create a CMIS Server - java

The company i work for needs to validate/certificate all stored PDF files and save different versions of the PDF's.
and so i am trying to make our file system/logic be CMIS compliable, because the validation is going to be made by a third party.
The filing logic we have now is based on paths + GUID, these values are saved in a data base. Then we have a couple of WS that get and set the PDF.
i am a .net Visual studio guy, and the tutorial in OpenCMIS Server Development Guide - 2nd Edition is for eclipse and I cannot get it to work.
is there any other CMIS server tutorial? it would be better if it was in .net but I will be happy with any other tutorial.
Thanks
PS: I already have the NCMIS project.

Related

Setting up MySQL and Apache for RESTful webservices

Can anybody point me in the right direction for instructions on setting up the following items on a Windows development PC?
Setup a MySQL database.
Setup an Apache webserver, a framework plus an IDE so that I can write RESTful APIs using Java and JSON.
I am using this to write a native Android and IOS mobile app that will store and retrieve data from the MySql database using the RESTful APIs on the Apache web server.
I have searched through several tech books, Google and Stack Overflow but cannot find anything that contains the above specific items. Within Stack Overflow, the following two links proved useful but do not give the specific items that I need. Android - Ruby on Rails - MySQL AND Best practice selecting database for mobile app
If you are planning to develop RESTful APIs using a Windows development PC, you could consider some of the available software bundles like XAMPP (https://www.apachefriends.org/index.html), which include an Apache distribution containing MariaDB (successor of MySQL, you can work with MariaDB as you would in MySQL), PHP (server-side language), and Perl (not neccesary) in a single Windows installer. Then, once you install it, you will have a complete web development environment up and running.
Then, considering that you develop your APIs using PHP as the server-side programming language (which I strongly recommend you as it is the most widely used language for this purpose), several additional decisions have to be taken, in terms of deciding about:
The IDE to develop in. When working with PHP, I recommend you PHPStorm IDE (https://www.jetbrains.com/phpstorm). The best in my humble opinion. However, quite complex and not very easy, but it completely worths learning.
The PHP framework. Unless you want to manually program your APIs (completely madness), you will have to use one of the many available PHP frameworks. In this case, I recommend you Laravel Framework (http://laravel.com). As far I have seen and worked, the best present and future option concerning PHP development. You could then install some RESTful API specific package in top of Laravel to speed up the development, like Dingo/API (https://github.com/dingo/api).
I insist this is just my recommendation, but you have to know that behind all that languages and frameworks there is a quite long and hard learning curve.
Good luck anyway!
1) To install MySQL on Windows refer to this official MySQL guide.
You will need to download and then extract the zip file (I would recommend the Community Edition). You will have all the details you need in the link above. Note that the .msi installer for Windows is no longer available for newer versions of MySQL.
2) Since you are going to use Java, you do not need the Apache web server (httpd) but you need Apache Tomcat as a servlet container (or other alternatives like Glassfish, JBoss as full Java EE application servers).
For building RESTful Web APIs in Java, Jersey is very good option (https://jersey.java.net).
Finally, as an IDE you can use anything, the most popular being Eclipse, NetBeans and IntelliJ IDEA.

Edit files (read/edit/save) in java based web application via webdav

im searching for informations how to implement a service in our servlet based java web application which can handle online editing (reading / editing / saving) of some common file types like the programs of the office suite via webdav.
We have a tomcat 7 running and using webdav already for mounting folders on client computers (implemented by an colleague) which works fine.
Now im having the request to research ways to implement this online editing features (for example open a .doc file in our webapp, edit the file in word and save it automaticly in our webapp) and couldn't find that many informations/howtos about this topic.
From what i could find so far i could see that using this webdav feature some response header values needs to be set and a own servlet needs to be implemented.
But im still not sure where to start and if im right...
Does anybody knows any good resoures for this? (documentations, simple webapp example, ...whatever)?
You should use Milton, its intended for exactly the purpose you describe. Its pretty simple to implement, you create annotatated methods which make the information in your web application available via webdav. This includes file and folder browsing, as well as uploading, downloading and locking (required for MS Office)
There are tutorials on the milton website which guide you through the implementation process.
Here's a simple hello world implementation from the first tutorial:
https://github.com/miltonio/milton2/blob/master/examples/tuts-anno1/src/main/java/com/helloworld/HelloWorldController.java
Milton comes with a free community edition which supports DAV level 1 only. That will work with most 3rd party webdav clients like Bitkinex, Cyberduck, etc. But for compatibility with operating system webdav clients, including Win7, MacOS, MS Office, you need the enterprise edition which is available on a commercial license.
Please see the milton site for details - http://milton.io
(I'm the author)

Java API or library to edit MS Office or Open Office files using UI

Is there a Java API or library available to edit MS office or open office files using user interface and that could be attached with a Java project?
I know about Apache POI for MS office or Java UNO API for Open Office files, but they are creating, changing file functionality by writing codes not using User Interface.
I don't think there is a a free or commercially available office solution in Java that you could embed into your Swing application. The best bet might be to embed open openoffice.
Here's a tutorial on how to do so. It's quite old, so it might not work exactly like described there, but in principle it should be possible.

OpenOffice in Java

I need a Java interface to the OpenOffice document conversion which would equal to a manual (Open... and then Save As...) as well as access to the PDF generation.
The following are some example of what I want to achieve.
1) Open one type of document (fx. OpenOffice Writer document or Microsoft Office document) onto memory and save it in another supported format.
2) Open one type of document into memory and export it as PDF.
I have gone through http://api.openoffice.org but didn't get any material which can help me to get started.
I also tried JODConverter but it requires me to run OpenOffice as a service.
I wold prefer to include all the core functionality of OpenOffice in one JAR file so that that the user can use my application without installing or running openoffice on their PC.
What would be a URL/code snippet from where I can get tutorials to get started?
Also do I have to add some JAR files?
Will the application work even if I don't have OpenOffice installed on my PC?
You might want to have a look at noa-libre (Nice Office Access, formerly available at ion.ag). It's a Java API that wraps OO.o's native Java API to be easier to use. It allows you to quickly "remote control" OO.o.
Also tell me if i have to add some jars?
Yes, that is documented.
Will the application work even if i dont have open office not installed on my pc?
No, the application requires a running (!) instance of OO.o, as it essentially remote-controls OO.o. The instance can in theory run on another computer (controlled via network).
try the ODF Toolkit project . it has an API that allows you to manipulate openoffice documents without having openoffice.org installed in your client machine.
here is a good article that get you started with ODF toolkit : Integrate OpenOffice with Java without Installing OpenOffice
I once used OpenOffice for MS Word to PDF conversion. Although it was the only free solution, I wasn't quite satisfied with the resulting PDF file, specially when your document has complex bidi scripts.
For conversion, as far as I can remember, there was two possible ways. One to use OS pipes and the other was socket or something. I don't have my code right now, but the only thing you need is to search in that URL. You should first launch an OpenOffice executable file (I just followed a simple turorial in OpenOffice wiki) with some parameters, and then run your Java application, using provided Java libraries.

Data Viewer for AppEngine development server

The Google AppEngine development server simulates Google's backend database with an embedded database. It creates a file on you local disk that you can delete to clear the DB.
Is there a tool that allows to browse and edit this data, similar to the Data Viewer that you get for deployed applications?
Clarification: I am asking about the Java toolkit, not the Python one.
Finally, data viewer comes with Google App Engine Java SDK version 1.2.2.
It can be accessed at:
http://localhost:8080/_ah/admin
or
http://localhost:8888/_ah/admin
The same link as in Python version.
On my system (sdk 1.2.8 I think) the dev server runs on port 8888. So the data viewer is at http://localhost:8888/_ah/admin
You can find it at http://localhost:8080/_ah/admin. Looks bit different, but provides the same functionality (apart of some bugs).
But in the light of OP question amendment this answer is not relevant anymore.

Categories