portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jf...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager JetspeedDescriptorUtilities.java
Date Thu, 11 Mar 2004 23:19:10 GMT
jford       2004/03/11 15:19:10

  Modified:    portal/src/java/org/apache/jetspeed/tools/pamanager
                        JetspeedDescriptorUtilities.java
  Log:
  Use MetadataRuleSet for rule definitions
  
  Revision  Changes    Path
  1.3       +18 -2     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/JetspeedDescriptorUtilities.java
  
  Index: JetspeedDescriptorUtilities.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/JetspeedDescriptorUtilities.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JetspeedDescriptorUtilities.java	11 Mar 2004 19:22:08 -0000	1.2
  +++ JetspeedDescriptorUtilities.java	11 Mar 2004 23:19:10 -0000	1.3
  @@ -22,6 +22,7 @@
   import org.apache.commons.logging.LogFactory;
   import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
   import org.apache.jetspeed.tools.pamanager.rules.LocalizedFieldRule;
  +import org.apache.jetspeed.tools.pamanager.rules.MetadataRuleSet;
   import org.apache.jetspeed.tools.pamanager.rules.PortletRule;
   
   /**
  @@ -54,6 +55,8 @@
               digester.setNamespaceAware(true);
               digester.push(app.getMetadata());
               
  +            digester.addRuleSet(new MetadataRuleSet("portlet-app/"));
  +            /*
               digester.addRule("portlet-app/title", new LocalizedFieldRule());
               digester.addRule("portlet-app/contributor", new LocalizedFieldRule());
               digester.addRule("portlet-app/creator", new LocalizedFieldRule());
  @@ -69,11 +72,23 @@
               digester.addRule("portlet-app/subject", new LocalizedFieldRule());
               digester.addRule("portlet-app/type", new LocalizedFieldRule());
               digester.addRule("portlet-app/metadata", new LocalizedFieldRule());
  +            */
               
               //	digester.addSetNext("portlet-app", "setMetadata");
               
   			//digester.addRule("portlet-app/portlet", new PortletRule(app));
  +            
  +            /*
  +	            This will continually push an object onto the digester stack it will never
pop it off.
  +	            The only negative effect is increased memory/stack size.  
  +	            
  +	            This is not a problem because the rules will work with the last object on
the stack
  +	            to pop the object off the stack, a new rule mapped to portlet-app/portlet
would
  +	            need to be added that all it did was pop the current object at the portlet
end element
  +            */
   			digester.addRule("portlet-app/portlet/portlet-name", new PortletRule(app));
  +			
  +			/*
   			digester.addRule("portlet-app/portlet/title", new LocalizedFieldRule());
   			digester.addRule("portlet-app/portlet/contributor", new LocalizedFieldRule());
   			digester.addRule("portlet-app/portlet/creator", new LocalizedFieldRule());
  @@ -89,7 +104,8 @@
   			digester.addRule("portlet-app/portlet/subject", new LocalizedFieldRule());
   			digester.addRule("portlet-app/portlet/type", new LocalizedFieldRule());
   			digester.addRule("portlet-app/portlet/metadata", new LocalizedFieldRule());
  -             
  +            */
  +			digester.addRuleSet(new MetadataRuleSet("portlet-app/portlet/"));
               
               digester.parse(reader);
               result = true;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message