[opencms-dev] Writing a simple MasterModule
Stephan Hartmann
beffe at beffe.de
Sat Jan 24 20:57:01 CET 2004
Hi,
the method getDbAccessObject returns a DbAccessObject whose filterAll method
returns the Vector.
----- Original Message -----
From: "tol" <opencms at recordcaster.de>
To: <opencms-dev at opencms.org>
Sent: Saturday, January 24, 2004 2:54 PM
Subject: [opencms-dev] Writing a simple MasterModule
> Hi @all!
>
> I want to understand the concept of the MasterModules. Therfore I trying
> to write a first simple MasterModule example - learning by doing ;)
> I read the docs in the usermanual again and again. But all questions
> can't be resolved, so I hope someone can help me :)
>
> There have to defined a function called filterAll(...). In the pdf-doc
> is written the following sample-code:
>
> /**
> * Filter method.
> * @param cms - the CmsObject to get access to the cms ressources.
> * @return a Vector of Content Definition.
> */
> public static Vector filterAll(CmsObject cms) throws CmsException {
> return ((CmsDbAccess)getDbAccessObject(C_SUB_ID)).filterAll
> (cms, CmsContentDefinition.class, C_SUB_ID);
> }
>
>
> I assume, the comment
>
> * @return a Vector of Content Definition.
>
> conflicts with the return statment
>
> return ((CmsDbAccess)getDbAccessObject
>
> If I understand it right, than the result was changed to CmsDbAccess.
> And that is not equal to ContentDefinition ... What is correct? The
> comment or the changeoperator?
>
> Which CmsDbAccess should be used???
> - com.opencms.file.generic.CmsDbAccess
> - com.opencms.file.mysql.CmsDbAccess
> - com.opencms.defaults.master.generic.CmsDbAccess
>
> None of them semms to implement the filterAll(..) function ... ??
>
> In the return statment there is called the filterAll function with the
> paramter "CmsContentDefinition.class". m I right CmsContentDefinition is
> a Class? ... but there exists no Class called CmsContentDefinition!? ..
> or I couldn't find it ;)
>
> But I found an abstract class A_CmsContentDefinition! Have I to write:
> A_CmsContentDefinition.class??
>
> Argh! Feeling confused! If someone can help - I would be very happy!! :)
>
> Tol
> --
> independent internet radio berlin
> http://www.recordcaster.de
>
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list