portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amedeo Zottola" <amedeo.zott...@noema.it>
Subject [meta-info] add new tag
Date Fri, 11 Oct 2002 15:55:43 GMT
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:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message