[opencms-dev] Integration into (huge) legacy web-app

Christian Steinert christian_steinert at web.de
Tue Dec 19 11:55:59 CET 2006


Anders Bengtsson schrieb:
> Christian Steinert wrote:
>
>   
>> It might be better to just keep your data in opencms, and to use your
>> main application to get the needed information from opencms and assemble
>> your pages. That would mean, though, that you could only use the Java
>> APIs of OpenCms and not the JSP layer.
>>     
>
> I guess this would be a fine solution, if there is a stable and
> documented API to work against. 
Somebody here on the list had written a factory that delivers an
instance of a CmsObject, which is *the* main class for resource access
in OpenCms.
The API-Docs are here:
http://www.opencms.org/export/javadoc/core/org/opencms/file/CmsObject.html

CmsObject is also the main class used for communication with the system,
when you are running *inside* of the cms, so you shouldn't have any
additional limitations when accessing resources, compared to a "native"
java class that runs inside of OpenCms directly. Of course you cannot
use the Taglib, the JSP template mechanism or the cache, if you work
through the API alone, because in this case you avoid the JSP layer.

The only problem might be that the instance factory is not part of the
distribution, so it may need adjustments as OpenCms changes (on the
other hand this instance factory is just based on code from the
commandline shell of opencms that allows to trigger various functions of
opencms, even if the JSP-based workplace is not running, so in case of
changes the work for adjusting it should be moderate and could be
derived from existing code in the core, if adjustments should become
necessary in the future).

The factory class should be findable in the mailing list archive (It is
a mail from Andreas Haumer, containing a class called
"CmsObjectFactory") together with an example.

Apart from this, you may want to check the API docs to see if the
existing APIs have the functionality that you would need. If you have
further questions concerning specific abilities of opencms, then people
here are usually very helpful, especially if you ask precise questions
about specific features or problems.

hth
christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20061219/7d93f17d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3269 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20061219/7d93f17d/attachment.bin>


More information about the opencms-dev mailing list