[opencms-dev] Access OpenCMS via API - URGENT // RE: [opencms -dev] Class CmsRequestHttpServlet

ambiesense at gmx.de ambiesense at gmx.de
Wed Mar 26 14:47:34 CET 2003


Hello Peter,

thank you for fast and comprehensive answer. I really apprecaite it and you
helped me a lot in getting into the thinking of OpenCMS.

The approach, which has been used by the CmsShell class is indeed not that
of a client. But it could work as a server. Incomming requests could be
handled against one OpenCMS instance. Can you give me more informaiton about it?

1) How is the behaviour in terms of resources? How good is the performance
of this this? Does every OpenCMS instance need as much resouces as one OpenCMS
servlet in Tomcat?

2) Is this instance not an instance in Tomcat? Or is it? When I run the
commands in CmsShell I get answers i.e. about the actual modules in the Tomcats
OpenCMS instance but I get an error when I try to execute the "getUsers"
command. It looks like some commands are static and some access Tomcats OpenCMS
instance.

3) Are there limitations in terms of functionality or can I use the entire
API of OpenCMS ?

4) Is there instance data which I cannot access with this approach? I.e. can
I access every datafile (if permissions exist) i.e. XML file, HTML file,
template or folders? Limitaitons?

5) Do you know any other limitations of this approach? 

Any help will be greatly appreaciated! 

Thanks a lot!
Ralf


> Hi Ralf,  Hi Laurent!
> 
> I was also looking for some more information about the core openCMS-API (=
> accessing / creating content from "outside"),
> especially the possibility to access the system from other programs - like
> Ralf
> describes in his posting.
> 
>  My current results are:
> 
> a) If you have an instance of "CMSObject", everything is fine. You can
> access
> all the functionality you need.
> 
> b) Only for JSP-Files that are part of the openCMS system (and
> calling-sequence), it is easy to get such an instance (see "RE:
> [opencms-dev]
> Class CmsRequestHttpServlet")
> 
> c) The only alternative way I detected so far to CREATE such an instance
> is the
> approach that is used in "com.opencms.core.CMSShell.java". This is the
> main
> class for the command line shell utility that can be started by calling
> the
> cmsshell.bat / cmsshell.sh from your openCMS/WEB-INF directory.
> Unfortunatly, this isn't really something you would use for Ralf's
> scenarios
> "1)" and "2)", because this is not "connecting to the CMS-server" at all,
> but
> setting up a new server, i.e. new DB-Connections + need for all JAR-Files
> + ....
> (-> a "real" client from my point of view, should not need all the
> class-files
> and should not directly connect to the main DB?!?)
> 
> But maybe (hopefully ;-) I'm wrong and there is still another way to get
> such an
> instance of CMSObject. If you find one, please inform me!
> 
> Regards,
> Peter
> 
> 
> 
> |-------+----------------->
> |       |                 |
> |       | ambiesense at gmx.d|
> |       | e               |
> |       |                 |
> |       | 25.03.2003 18:49|
> |       | Please respond  |
> |       | to opencms-dev  |
> |       |                 |
> |-------+----------------->
>  
>
>---------------------------------------------------------------------------->
>   |                                                                       
>     |
>   |     To:  opencms-dev at www.opencms.org                                  
>     |
>   |     cc:  (bcc: Peter Trumpp/ENTORY/GDB)^                              
>     |
>   |     Subject:  RE: [opencms-dev] Access OpenCMS via API - URGENT       
>     |
>  
>
>---------------------------------------------------------------------------->
>   >--------------------|
>   |                    |
>   >--------------------|
> 
> 
> 
> 
> 
> Hi,
> 
> I wonder if I could implement one or more of the following examples:
> 
> 1) I would like to have a java program runnung as a Servlet in Tomcat. Can
> this servler use OpenCMS via its API to insert Data into OpenCMS ?
> 
> 2) I have a Java Program outside of of Tomcat and OpenCMS but on the same
> machine. Can this Java program access OpenCMS somehow (API?) to do this?
> 
> 3) How can I run the program, mentioned before, inside of OpenCMS. Can I
> trigger this program via OpenCMS (i.e. every time a certain web page get
> accessed) ?
> 
> The documentation gives me only the impression I can run some code
> triggered
> by content templates. This is not enought for me. I would like to develop
> some some comprehensive logic which uses OpenCMS. Are there better CMS
> solutions for this? Thank you for any feedback!
> 
> Cheers
> Ralf
> 
> 
> > Do you mean creating new files automatically within the opencms? If that
> > is
> > what you mean you probably can adapt the functionality from
> > com.opencms.workplace.CmsNewResourcePage class.
> >
> > Regards,
> >
> > Olli
> >
> > > -----Original Message-----
> > > From: owner-opencms-dev at www.opencms.org
> > > [mailto:owner-opencms-dev at www.opencms.org]On Behalf Of
> ambiesense at gmx.de
> > > Sent: 25 March 2003 11:34
> > > To: opencms-dev at www.opencms.org
> > > Subject: [opencms-dev] Access OpenCMS via API - URGENT
> > >
> > >
> > > Hi,
> > >
> > > I would like to write a program which allows me to insert data
> > > into OpenCMS.
> > > I think the OpenCMS API should allow me this. How does it works? Can
> > > somebody provide me with a example source code or point me to a
> > > webpage handling
> > > with this topic?
> > >
> > > If OpenCMS is not good in this area ... Is there another open source
> (or
> > a
> > > product with a similar licence flexility) which can do this better?
> > >
> > > Cheers
> > > Ralf
> 
> 

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!




More information about the opencms-dev mailing list