[opencms-dev] opencms programatic access

Charilaos Pasantonopoulos pasantonopoulosc at Cardiff.ac.uk
Fri Apr 15 19:29:22 CEST 2005


Hello Jasper,

I may be facing a similar problem (not the remote part) of programaticaly
accessing/creating JSPs, something that is
needed if you want the users to be able to include "conditional" text in the web
site that shows/hides according to the 
logged in user profile.

Unfortunately I havent found any documentation for the core of opencms for that.
I could create a file as follows but
only in the virtual file system ... I think the file has to be exported then,
but I dont know how.

CmsJspLoginBean cms = new CmsJspLoginBean(pageContext, request, response);
String newElementName = new String("test");

CmsResource newElement =
cms.getCmsObject().createResource("/system/modules/com.mymodule.package/elements/"+newElementName+".jsp",8,"Text
Content of File".getBytes(),new LinkedList());

If anyone can point the complete procedure for creating files I would be
greatful.

regards,

Charlie


----------------------------------------------------------------------------------------------------------
Charilaos Pasantonopoulos HND BEng MSc MIEE - www.pasantonopoulos.net
Intelligent Information Systems Group                    - www.mec.cf.ac.uk/i2s/
Manufacturing Engineering Centre                          - www.mec.cf.ac.uk
University of Cardiff                                          -www.cf.ac.uk
-----------------------------------------------------------------------------------------------------------
>>> jasper.morgan at btelligent.de 04/15/05 4:45 PM >>>
Hi Everyone

My question is about how to programatially access opencms from another java
application (to upload and retrieve documents).  Is this at all possible?

>From what I've read, there is no remote api (java rmi / corba / web services),
which strongly suggests that opencms can only be accessed via its UI or custom
JSP pages.

If there is no remote api, does anybody have any thoughts about wrapping the
opencms libraries with a web service or java rmi layer? 

(I also remember reading a post somewhere -I've forgotton where! - that warned
against programatic access - would anyone know why that would be.)

Finally, am I missing something from the TagLib & Scripting APIs? I couldn't see
whether it is possible to create a custom JSP page (from another application) to
upload a file to Open CMS.

Many thanks for any feedback that you have.

Jasper Morgan




>>> jasper.morgan at btelligent.de 04/15/05 4:45 PM >>>




More information about the opencms-dev mailing list