[opencms-dev] How to add a new resource type

Emilio escoembulma at terra.es
Tue Feb 17 09:04:02 CET 2004


Hi,

 > "rules_key(d d aaai dddd dddd dddd dddd)"

a Active
i Inactive
d Desactive

and the bits....

1 - online state
2 - don't know
3 - Offline - not blocked - not modified
4 - Offline - not blocked - modified
5 - Offline - not blocked - new
6 - Offline - not blocked - delete
7 - Offline - blocked - not modified
8 - Offline - blocked - modified
9 - Offline - blocked - new
10 - Offline - blocked - delete

we don't know the meaning of the last 8 bits..............


bye

Vincent Hanniet escribió:

> It works fine, thanks all.
> But does anybody know the meaning of the parameters
> "rules_key(d d aaai dddd dddd dddd dddd)"
> in the files in /system/workplace/restypes/ directory ?
>
> Vincent
>
>
>> Olli,
>>
>> Wooo hoooo!
>>
>> Thanks for sharing the information. I'll be trying this right away.
>>
>> Matt
>>
>>
>>
>> Olli Aro wrote:
>>
>>> Hi All,
>>>
>>> I got this working:) The process for adding new resource types is as 
>>> below:-
>>>
>>> 1) Add new content type in register.xml e.g.
>>>
>>> <restype>
>>>     <name>MyNewType</name>
>>>     <launcherType>1</launcherType>
>>>     <launcherClass/>
>>>  <resourceClass>com.opencms.file. 
>>> CmsResourceTypeMyNewType</resourceClass>
>>>         </restype>
>>>
>>> The launcherType attribute depends on your resource type, however 
>>> the most
>>> cases you can use the type 1, which does not include any template 
>>> parsing
>>> and delivers the content as it is stored in your file.
>>>
>>> 2) Write your own CmsResourceType class. It has to be part of the 
>>> package
>>> com.opencms.file, so that the protected methods will work properly. 
>>> Your
>>> class must implement I_CmsResourceType, I_CmsConstants, Serializable 
>>> and
>>> overwrite all required workplace methods. Class
>>> com.opencms.file.CmsResourceTypePlain provides an useful example for 
>>> the
>>> class structure.
>>>
>>> 3) Customise the explorer popup menu for your new content type by 
>>> adding
>>> relevant file to /system/workplace/restypes/ directory. Again file
>>> compatiblePlain provides an useful example.
>>>
>>> Now you can create new resources based on your type with 
>>> cms.createResource
>>> whereby you must use your new resource type name as the type reference.
>>>
>>> Regards,
>>>
>>> Olli    ---
>>> Outgoing mail is certified Virus Free.
>>> Checked by AVG anti-virus system (http://www.grisoft.com).
>>> Version: 6.0.580 / Virus Database: 367 - Release Date: 06/02/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
>>
>>
>>
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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