[opencms-dev] About new Resource types for opencms 6.0.4

ANKIT SURESH AGARWAL, Noida ankit_agarwal at hcl.in
Mon Jan 28 10:19:41 CET 2008


Hi all,

  

As already submitted, the steps to create new resource type in opencms
6.0.4 weren't not completed. I tried to find the information in various
postings done here but could not find the answer. 

 

I submitted the steps again please follow and you will be successful.
Thanks to everyone who helped me creating this. 

 

 

 

 

1. i want to do it with module but this time i successful with
templateonemodule.

2. add this details to opencms-vfs.xml:-

       <type class="org.opencms.file.types.CmsResourceTypeXmlContent"
id="202"                         name="my_article">

            <param
name="schema">/system/modules/org.ankit.newresource/resources/schema/mya
rticle.xsd</param>

      </type>

3. then add this to opencms-workplace.xml

       <explorertype name="my_article" key="fileicon.my_article"
icon="myarticle.gif"                       reference="xmlcontent">

                                                <newresource
uri="newresource_xmlcontent.jsp?newresourcetype=my_article" order="32"/>

            </explorertype>

 

5. if you are using ur own defined .gif file dont forget it to add in
the program files resources folder.

 

4. update workplace.properties and workplace_en.properties of
templateone.xmlcontentdemo module. with the fileicon.my_article and
title.newmy_article and dont forget to publish this module after making
changes.

 

5. then restart tomcat

 

 

 

second method:

 

 

u need to create your module with the help of module management from the
administrator view. after creating module go to the opencms-module.xml
make changes as per followimg. please change the relative paths of your
resources. where org.ankit.newresource is my new module and
myarticle.xsd is my schema and i have added titles and names in
workplace.properties and wrokplace_en.properties placed in classes
folder of this module. after making all these changes please publlish
this module and redtart tomcat.

 

1.   <module>

            <name>org.ankit.newresource</name>

            <nicename><![CDATA[newresource]]></nicename>

            <class/>

            <description><![CDATA[Contains My New
Resource]]></description>

            <version>0.1</version>

            <authorname/>

            <authoremail/>

            <datecreated/>

            <userinstalled/>

            <dateinstalled/>

            <dependencies/>

            <exportpoints>

                <exportpoint
uri="/system/modules/org.ankit.newresource/lib/"
destination="WEB-INF/lib/"/>

                <exportpoint
uri="/system/modules/org.ankit.newresource/classes/"
destination="WEB-INF/classes/"/>

            </exportpoints>

            <resources>

                <resource uri="/system/modules/org.ankit.newresource/"/>

                                                <resource
uri="/system/workplace/resources/filetypes/myarticle.gif"/>

            </resources>

            <parameters>

                <param
name="additionalresources">/system/modules/org.ankit.newresource/;/syste
m/workplace/resources/filetypes/myarticle.gif</param>

            </parameters>

                                    <resourcetypes>

                <type
class="org.opencms.file.types.CmsResourceTypeXmlContent"
name="my_article" id="202">

                    <param
name="schema">/system/modules/org.ankit.newresource/resources/schema/mya
rticle.xsd</param>

                </type>

                                    </resourcetypes>

                                    <explorertypes>

                                       <explorertype name="my_article"
key="fileicon.my_article" icon="myarticle.gif" reference="xmlcontent">

                                                  <newresource
uri="newresource_xmlcontent.jsp?newresourcetype=my_article" order="32"/>

                                          <accesscontrol>

                        <accessentry principal="GROUP.Administrators"
permissions="+r+v+w+c"/>

                        <accessentry principal="GROUP.Projectmanagers"
permissions="+r+v+w+c"/>

                        <accessentry principal="GROUP.Users"
permissions="+r+v+w+c"/>

                  </accesscontrol>

               </explorertype>

                                    </explorertypes>

                                    

        </module>

 

 

 

Don't forget to publish all the files u make.



DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. 
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have 
received this email in error please delete it and notify the sender immediately. Before opening any mail and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20080128/5d9326db/attachment.htm>


More information about the opencms-dev mailing list