[opencms-dev] DbAccess for a custom file type

Andy Bicksbo schlachtzeuger at gmail.com
Thu Nov 2 01:04:27 CET 2006


Hi
I think you missunderstood me. I don't want to create a new resource type, i
want to implement some custom Objects, such as for exemple a CmsUser, or
CmsProject,... and create an specific dbconnection, which should be in the
same style and structure as the dbconnection of for exemple CmsUser. So the
point is, that i don't know how to get an apropriate CmsDbContext for the
method calls(which get added at SecurityManager) and how to implement the
new Driver to CmsDriverManager, that the new Driver(implements the Driver
interface) gets correctly initialized

Hope thats more clearly know
An additional quastion would be, what is it good for making some major
classes of an opensource project final?
  and not provide public access to methods?
A possibilty would be to add classes to some opencms packages, but this
would cause loads of props at updating opencms.

thx for help
Andy


2006/11/2, Christian Steinert <christian_steinert at web.de>:
>
> Andy Bicksbo schrieb:
>
>  Hi all!
> I studied the dbaccess of opencms and realized that every datatype comming
> out of the db has it's own DbDriver class. So if for example a user should
> get out of the db into the UserList of the admin view, the request of the
> list has to go through
>
>    1) CmsObject
>        where the requestContext is added to the request,
>        no problem to cutomize this, a public getter for the COntext is
> provided
>
>    2) CmsSecurityManager
>        where the DbContext is added to the request,
>        AND THATS THE POINT I HAVE NO CLUE HOW TO CUSTOMIZE THIS
>        the class is final so i cannot subclass it
>        i found nothing to get the DbContextFactory out of this Object for
> the DbContext
>
>    3) CmsDriverManager
>        here the special driver gets init
>        Same proplems with as point 2) class is final
>
> and then the DbDriver reads the special user data (i manage to build my
> own driver);
>
> So if someone has an idea how to build dbaccess for custom filetype in
> style of opencms plz help me!
>
> thx andy
>
>
> Dear Andy,
>
> You definitely do not have to modify all the classes you have mentioned.
> Your system would become so different from the standard codebase, that lots
> of problems would follow.
>
> I have written down some notes on what I know about custom resource types:
> http://opencms-wiki.org/index.php/Custom_File_and_Folder_Types
>
> That's about what I know on this topic and it should hopefully give you at
> least an idea of where to start.
> If you find out something that's not written there, please extend the
> WIKI-entry.
>
> hth
> christian
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20061102/75068dcd/attachment.htm>


More information about the opencms-dev mailing list