You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Amedeo Zottola <am...@noema.it> on 2002/10/11 17:55:43 UTC

[meta-info] add new tag

Hi all,
   i tempt to add in meta-info tag (inside a portlet-entry) my own
tag...
   but didn't work :'(

   Some idea?!
I'm despairs!!!
Help me, please...
Amedeo.


This is my modify:

- local-portlets.xreg
    <portlet-entry name="Login" hidden="false" type="ref"
parent="CustomizerVelocity" application="false">
        <meta-info>
            <title>Login</title>
            <description>Portlet per l'autenticazione
utenti</description>
            <mytag>MY_TAG_VALUE</mytag>
        </meta-info>
        <parameter name="template" value="login" hidden="false"/>
        <media-type ref="html"/>
        <category group="internal">Accounting</category>
    </portlet-entry>


So, i changed some java sources :

- org.apache.jetspeed.om.registry.MetaInfo.java
	+ public setMyTag(String mytag);
	+ public String getMyTag();

- org.apache.jetspeed.om.registry.base.BaseMetaInfo.java
	+ public setMyTag(String mytag);
	+ public String getMyTag();
	- public BaseMetaInfo(String title, String description, String
image) {
	+ public BaseMetaInfo(String title, String description, String
image, String mytag) {...

- org.apache.jetspeed.om.registry.PortletEntry.java
	+ public String getMyTag();	

- org.apache.jetspeed.om.registry.base.BasePortletEntry.java
	+ public String getIcon() {
      + 	return getMetaInfo().getMyTag();
    	+ }



-
org.apache.jetspeed.services.portletfactory.JetspeedPortletFactoryServic
e.java
        if ( entry.getImage() != null )
            data.setImage( entry.getImage() );

      +  if ( entry.getMyTag() != null )
      +      data.setMyTag( entry.getMyTag() );


- org.apache.jetspeed.util.MetaData.java
	+ public void setMyTag(String mytag) { setMyTag(mytag, null); }
	+
    	+ public void setMyTag(String mytag, Locale locale) {
setProperty("mytag", locale, mytag);}
	+
	+ public String getMyTag() { return getMyTag(null); }
	+
	+ public String getMyTag(Locale locale) {
      + 	String mytag= (String) getProperty("mytag", locale);
      +  	if ((mytag== null) && (locale != null)) {
      +     	mytag= (String) getProperty("mytag", null);
      +  	}
	+
      +  	if (mytag == null) {
      +     	mytag = "default mytag value";
      +  	}
	+
      +  	return mytag;
	+ }
    
    
- org.apache.jetspeed.om.registry.base.BaseRegistryEntry.java
	- public BaseRegistryEntry(long id, String name, int _hidden,
String title,String description,
      -                          String image,String role) {
      -       this.id = id;
      -       this.name = name;
      -       this._hidden = _hidden;
      -       this.hidden = (_hidden == 1);
      -       BaseMetaInfo meta = new BaseMetaInfo(title, description,
image);
      -       this.setMetaInfo(meta);
      - }

	+ public BaseRegistryEntry(long id, String name, int _hidden,
String title,String description,
      +                          String image,String role,String mytag)
{
      +       this.id = id;
      +       this.name = name;
      +       this._hidden = _hidden;
      +       this.hidden = (_hidden == 1);
      +       BaseMetaInfo meta = new BaseMetaInfo(title, description,
image, mytag);
      +       this.setMetaInfo(meta);
      + }

- org.apache.jetspeed.om.registry.base.BaseMediaTypeEntry.java
	- public BaseMediaTypeEntry(long id, String name, int _hidden,
String mimeType, String title, String description,
	-                           String image, String role) { 
      -                                 super(id, name, _hidden, title,
description, image, role); 
      - }

	+ public BaseMediaTypeEntry(long id, String name, int _hidden,
String mimeType, String title, String description,
	+                           String image, String role, String
mytag) { 
      +                                 super(id, name, _hidden, title,
description, image, role, mytag);
      + }

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [meta-info] add new tag

Posted by Paul Spencer <pa...@apache.org>.
Did you add the element to conf/registry.xml?  I you did not, then 
Castor will not populate the field in you class.

I am assuming "didn't work" means entry.getMyTag() always return a null.

Paul Spencer

Amedeo Zottola wrote:

> Hi all,
>    i tempt to add in meta-info tag (inside a portlet-entry) my own
> tag...
>    but didn't work :'(
> 
>    Some idea?!
> I'm despairs!!!
> Help me, please...
> Amedeo.
> 
> 
> This is my modify:
> 
> - local-portlets.xreg
>     <portlet-entry name="Login" hidden="false" type="ref"
> parent="CustomizerVelocity" application="false">
>         <meta-info>
>             <title>Login</title>
>             <description>Portlet per l'autenticazione
> utenti</description>
>             <mytag>MY_TAG_VALUE</mytag>
>         </meta-info>
>         <parameter name="template" value="login" hidden="false"/>
>         <media-type ref="html"/>
>         <category group="internal">Accounting</category>
>     </portlet-entry>
> 
> 
> So, i changed some java sources :
> 
> - org.apache.jetspeed.om.registry.MetaInfo.java
> 	+ public setMyTag(String mytag);
> 	+ public String getMyTag();
> 
> - org.apache.jetspeed.om.registry.base.BaseMetaInfo.java
> 	+ public setMyTag(String mytag);
> 	+ public String getMyTag();
> 	- public BaseMetaInfo(String title, String description, String
> image) {
> 	+ public BaseMetaInfo(String title, String description, String
> image, String mytag) {...
> 
> - org.apache.jetspeed.om.registry.PortletEntry.java
> 	+ public String getMyTag();	
> 
> - org.apache.jetspeed.om.registry.base.BasePortletEntry.java
> 	+ public String getIcon() {
>       + 	return getMetaInfo().getMyTag();
>     	+ }
> 
> 
> 
> -
> org.apache.jetspeed.services.portletfactory.JetspeedPortletFactoryServic
> e.java
>         if ( entry.getImage() != null )
>             data.setImage( entry.getImage() );
> 
>       +  if ( entry.getMyTag() != null )
>       +      data.setMyTag( entry.getMyTag() );
> 
> 
> - org.apache.jetspeed.util.MetaData.java
> 	+ public void setMyTag(String mytag) { setMyTag(mytag, null); }
> 	+
>     	+ public void setMyTag(String mytag, Locale locale) {
> setProperty("mytag", locale, mytag);}
> 	+
> 	+ public String getMyTag() { return getMyTag(null); }
> 	+
> 	+ public String getMyTag(Locale locale) {
>       + 	String mytag= (String) getProperty("mytag", locale);
>       +  	if ((mytag== null) && (locale != null)) {
>       +     	mytag= (String) getProperty("mytag", null);
>       +  	}
> 	+
>       +  	if (mytag == null) {
>       +     	mytag = "default mytag value";
>       +  	}
> 	+
>       +  	return mytag;
> 	+ }
>     
>     
> - org.apache.jetspeed.om.registry.base.BaseRegistryEntry.java
> 	- public BaseRegistryEntry(long id, String name, int _hidden,
> String title,String description,
>       -                          String image,String role) {
>       -       this.id = id;
>       -       this.name = name;
>       -       this._hidden = _hidden;
>       -       this.hidden = (_hidden == 1);
>       -       BaseMetaInfo meta = new BaseMetaInfo(title, description,
> image);
>       -       this.setMetaInfo(meta);
>       - }
> 
> 	+ public BaseRegistryEntry(long id, String name, int _hidden,
> String title,String description,
>       +                          String image,String role,String mytag)
> {
>       +       this.id = id;
>       +       this.name = name;
>       +       this._hidden = _hidden;
>       +       this.hidden = (_hidden == 1);
>       +       BaseMetaInfo meta = new BaseMetaInfo(title, description,
> image, mytag);
>       +       this.setMetaInfo(meta);
>       + }
> 
> - org.apache.jetspeed.om.registry.base.BaseMediaTypeEntry.java
> 	- public BaseMediaTypeEntry(long id, String name, int _hidden,
> String mimeType, String title, String description,
> 	-                           String image, String role) { 
>       -                                 super(id, name, _hidden, title,
> description, image, role); 
>       - }
> 
> 	+ public BaseMediaTypeEntry(long id, String name, int _hidden,
> String mimeType, String title, String description,
> 	+                           String image, String role, String
> mytag) { 
>       +                                 super(id, name, _hidden, title,
> description, image, role, mytag);
>       + }
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: [meta-info] add new tag

Posted by Mark Orciuch <ma...@ngsltd.com>.
Amedeo,

I believe that you need to update meta-info mapping in Registry.xml with
your new tag.

Best regards,

Mark C. Orciuch
Next Generation Solutions, Ltd.
e-Mail: mark_orciuch@ngsltd.com
web: http://www.ngsltd.com


> -----Original Message-----
> From: Amedeo Zottola [mailto:amedeo.zottola@noema.it]
> Sent: Friday, October 11, 2002 10:56 AM
> To: Jetspeed Developers List
> Subject: [meta-info] add new tag
>
>
> Hi all,
>    i tempt to add in meta-info tag (inside a portlet-entry) my own
> tag...
>    but didn't work :'(
>
>    Some idea?!
> I'm despairs!!!
> Help me, please...
> Amedeo.
>
>
> This is my modify:
>
> - local-portlets.xreg
>     <portlet-entry name="Login" hidden="false" type="ref"
> parent="CustomizerVelocity" application="false">
>         <meta-info>
>             <title>Login</title>
>             <description>Portlet per l'autenticazione
> utenti</description>
>             <mytag>MY_TAG_VALUE</mytag>
>         </meta-info>
>         <parameter name="template" value="login" hidden="false"/>
>         <media-type ref="html"/>
>         <category group="internal">Accounting</category>
>     </portlet-entry>
>
>
> So, i changed some java sources :
>
> - org.apache.jetspeed.om.registry.MetaInfo.java
> 	+ public setMyTag(String mytag);
> 	+ public String getMyTag();
>
> - org.apache.jetspeed.om.registry.base.BaseMetaInfo.java
> 	+ public setMyTag(String mytag);
> 	+ public String getMyTag();
> 	- public BaseMetaInfo(String title, String description, String
> image) {
> 	+ public BaseMetaInfo(String title, String description, String
> image, String mytag) {...
>
> - org.apache.jetspeed.om.registry.PortletEntry.java
> 	+ public String getMyTag();
>
> - org.apache.jetspeed.om.registry.base.BasePortletEntry.java
> 	+ public String getIcon() {
>       + 	return getMetaInfo().getMyTag();
>     	+ }
>
>
>
> -
> org.apache.jetspeed.services.portletfactory.JetspeedPortletFactoryServic
> e.java
>         if ( entry.getImage() != null )
>             data.setImage( entry.getImage() );
>
>       +  if ( entry.getMyTag() != null )
>       +      data.setMyTag( entry.getMyTag() );
>
>
> - org.apache.jetspeed.util.MetaData.java
> 	+ public void setMyTag(String mytag) { setMyTag(mytag, null); }
> 	+
>     	+ public void setMyTag(String mytag, Locale locale) {
> setProperty("mytag", locale, mytag);}
> 	+
> 	+ public String getMyTag() { return getMyTag(null); }
> 	+
> 	+ public String getMyTag(Locale locale) {
>       + 	String mytag= (String) getProperty("mytag", locale);
>       +  	if ((mytag== null) && (locale != null)) {
>       +     	mytag= (String) getProperty("mytag", null);
>       +  	}
> 	+
>       +  	if (mytag == null) {
>       +     	mytag = "default mytag value";
>       +  	}
> 	+
>       +  	return mytag;
> 	+ }
>
>
> - org.apache.jetspeed.om.registry.base.BaseRegistryEntry.java
> 	- public BaseRegistryEntry(long id, String name, int _hidden,
> String title,String description,
>       -                          String image,String role) {
>       -       this.id = id;
>       -       this.name = name;
>       -       this._hidden = _hidden;
>       -       this.hidden = (_hidden == 1);
>       -       BaseMetaInfo meta = new BaseMetaInfo(title, description,
> image);
>       -       this.setMetaInfo(meta);
>       - }
>
> 	+ public BaseRegistryEntry(long id, String name, int _hidden,
> String title,String description,
>       +                          String image,String role,String mytag)
> {
>       +       this.id = id;
>       +       this.name = name;
>       +       this._hidden = _hidden;
>       +       this.hidden = (_hidden == 1);
>       +       BaseMetaInfo meta = new BaseMetaInfo(title, description,
> image, mytag);
>       +       this.setMetaInfo(meta);
>       + }
>
> - org.apache.jetspeed.om.registry.base.BaseMediaTypeEntry.java
> 	- public BaseMediaTypeEntry(long id, String name, int _hidden,
> String mimeType, String title, String description,
> 	-                           String image, String role) {
>       -                                 super(id, name, _hidden, title,
> description, image, role);
>       - }
>
> 	+ public BaseMediaTypeEntry(long id, String name, int _hidden,
> String mimeType, String title, String description,
> 	+                           String image, String role, String
> mytag) {
>       +                                 super(id, name, _hidden, title,
> description, image, role, mytag);
>       + }
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>