[opencms-dev] Getting a CmsResource by means of the resource id

Claus Priisholm cpr at codedroids.com
Fri Jun 25 20:00:02 CEST 2004


Okay, so I hadn't overlooked something. Yes it seems that the resource 
URI is the preferred unique key at the CmsObject level, and the 
resource id is mostly in play in DbAccess layer.

I've mapped the resource id to the unique key of my ContentDefinition 
(basically used as a wrapper for CmsResource) as this needs to be an 
integer to play well with the administrative UI. I guess the thing to 
do is just to have the XMLTemplate stuff involved in the administration 
part of my module pass along the URI (as it happens in say the HTML 
gallery) rather than the unique id of the content definition.

Claus

On 25/6-2004, at 13.19, Olli Aro wrote:

> You might have to look into the low level database calls or build this
> functionality yourself. As far as I know it the API uses URIs as unique
> identifiers for resources and the IDs are just for the database. But I 
> might
> be wrong on this one...
>
> Olli
>
> -----Original Message-----
> From: opencms-dev-admin at opencms.org 
> [mailto:opencms-dev-admin at opencms.org]
> On Behalf Of Claus Priisholm
> Sent: 25 June 2004 09:52
> To: opencms-dev at opencms.org
> Subject: [opencms-dev] Getting a CmsResource by means of the resource 
> id
>
> I'm probably overlooking something, but I haven't found a method in the
> 5.0.1 API that returns a CmsResource object given a resource id. Can
> anyone point me in the right direction?
>
> Thanks
> Claus
>
>
>
> OpenCms links & API's: http://www.codedroids.com/community/opencms
> --
> Claus Priisholm
> +45 48 22 46 46
> cpr <you know what> codedroids.com
> http://www.codedroids.com
>
> _______________________________________________
> 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
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.708 / Virus Database: 464 - Release Date: 18/06/2004
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.708 / Virus Database: 464 - Release Date: 18/06/2004
>
>
> _______________________________________________
> 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
>
>
--
Claus Priisholm, CodeDroids ApS
+45 48 22 46 46
cpr (you-know-what) interlet.dk - cpr (you-know-what) codedroids.com
http://www.interlet.dk - http://www.codedroids.com




More information about the opencms-dev mailing list