[opencms-dev] Resource Type reference

kevin fong kfong at spto.org
Sun Aug 1 07:12:01 CEST 2004


Thomas, if you have the source to opencms, look at this package: org.opencms.file.types

Each class in this package has an integer attribute called : C_RESOURCE_TYPE_ID. For example the integer for CmsResourceTypeBinary.C_RESOURCE_TYPE_ID = 5 as per the extract of the CmsResourceTypeBinary class.  

I suspect this is the number that is being referred to.

Regds,
kevin


package org.opencms.file.types;

import org.opencms.loader.CmsDumpLoader;

/**
 * Resource type descriptor for the type "binary".<p>
 *
 * @author Alexander Kandzior (a.kandzior at alkacon.com)
 * 
 * @version $Revision: 1.1 $
 */
public class CmsResourceTypeBinary extends A_CmsResourceType {

    /** The type id of this resource type. */
    public static final int C_RESOURCE_TYPE_ID = 5;




On Jul 30 12:23, Thomas Joseph Olaes <thomas.olaes at gmail.com> wrote:
>
> Subject: [opencms-dev] Resource Type reference
>
> Hello all!
> 
> Let's pretend I am writing a Java class with a function that does
> stuff to a CmsResource. I have the following object:
> 
> CmsFile cfProjectResource = ...;
> 
> when I do
> 
> int iThisFilesType = cfProjectResource.getType();
> 
> I get a number.... what does this number mean? I can't seem to find a
> table that corresponds to the data that describes these numbers, and I
> know there's an interface in the admin panel to create new resource
> types, so what gives?
> 
> I guess I will just root through whatever that code is in the admin
> panel and figure this out, but if someone can throw me a bone here I'd
> be much obliged.
> 
> Thanks in advance for any time and help given to me.
> 
> -TJ
> _______________________________________________
> 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