You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2002/03/13 16:45:30 UTC

cvs commit: xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/util AvalonUtil.java

cziegeler    02/03/13 07:45:30

  Modified:    src/scratchpad/src/org/apache/cocoon/sunshine/sunrise
                        ApplicationHandler.java Handler.java SunRise.java
               src/scratchpad/src/org/apache/cocoon/sunshine/sunspot
                        SunSpot.java
               src/scratchpad/src/org/apache/cocoon/sunshine/transformation
                        SunShinePreTransformer.java
  Removed:     src/scratchpad/src/org/apache/cocoon/sunshine/util
                        AvalonUtil.java
  Log:
  Removing obsolete AvalonUtil
  
  Revision  Changes    Path
  1.3       +3 -4      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/ApplicationHandler.java
  
  Index: ApplicationHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/ApplicationHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ApplicationHandler.java	22 Feb 2002 06:57:18 -0000	1.2
  +++ ApplicationHandler.java	13 Mar 2002 15:45:30 -0000	1.3
  @@ -60,7 +60,6 @@
   import org.apache.cocoon.environment.SourceResolver;
   import org.apache.cocoon.sunshine.context.SessionContext;
   import org.apache.cocoon.sunshine.connector.*;
  -import org.apache.cocoon.sunshine.util.AvalonUtil;
   import org.xml.sax.SAXException;
   
   /**
  @@ -68,7 +67,7 @@
    * inside a handler configuration.
    *
    * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  - * @version CVS $Id: ApplicationHandler.java,v 1.2 2002/02/22 06:57:18 cziegeler Exp $
  + * @version CVS $Id: ApplicationHandler.java,v 1.3 2002/03/13 15:45:30 cziegeler Exp $
   */
   public final class ApplicationHandler
   implements java.io.Serializable {
  @@ -123,14 +122,14 @@
           this.loadOnDemand = appconf.getAttributeAsBoolean("loadondemand", false);
   
           // get load resource (optinal)
  -        child = AvalonUtil.getChild(appconf, "load");
  +        child = appconf.getChild("load", false);
           if (child != null) {
               this.loadResource = new Resource(resolver, child.getAttribute("uri"));
               this.loadResource.setResourceParameters(SourceParameters.create(child));
           }
   
           // get save resource (optional)
  -        child =  AvalonUtil.getChild(appconf, "save");
  +        child =  appconf.getChild("save", false);
           if (child != null) {
               this.saveResource = new Resource(resolver, child.getAttribute("uri"));
               this.saveResource.setResourceParameters(SourceParameters.create(child));
  
  
  
  1.3       +13 -14    xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/Handler.java
  
  Index: Handler.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/Handler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Handler.java	22 Feb 2002 06:57:18 -0000	1.2
  +++ Handler.java	13 Mar 2002 15:45:30 -0000	1.3
  @@ -62,14 +62,13 @@
   import org.apache.cocoon.environment.SourceResolver;
   import org.apache.cocoon.sunshine.context.SessionContext;
   import org.apache.cocoon.sunshine.connector.*;
  -import org.apache.cocoon.sunshine.util.AvalonUtil;
   import org.xml.sax.SAXException;
   
   /**
    * The sunRise Handler.
    *
    * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  - * @version CVS $Id: Handler.java,v 1.2 2002/02/22 06:57:18 cziegeler Exp $
  + * @version CVS $Id: Handler.java,v 1.3 2002/03/13 15:45:30 cziegeler Exp $
   */
   public final class Handler
   implements java.io.Serializable {
  @@ -138,7 +137,7 @@
                             Configuration  conf)
       throws ProcessingException, SAXException, IOException, ConfigurationException {
           // get login (required)
  -        Configuration child = AvalonUtil.getChild(conf, "redirect-to");
  +        Configuration child = conf.getChild("redirect-to", false);
           if (child == null)
               throw new ConfigurationException("Handler '"+this.name+"' needs a redirect-to URI.");
           this.redirectURI = child.getAttribute("uri");
  @@ -161,77 +160,77 @@
           this.redirectParameters = SourceParameters.create(child);
   
           // get load resource (required)
  -        child = AvalonUtil.getChild(conf, "authentication");
  +        child = conf.getChild("authentication", false);
           if (child == null)
               throw new ConfigurationException("Handler '"+this.name+"' needs authentication configuration");
           this.authenticationResource = new Resource(resolver, child.getAttribute("uri"));
           this.authenticationResource.setResourceParameters(SourceParameters.create(child));
   
           // get load resource (optional)
  -        child = AvalonUtil.getChild(conf, "load");
  +        child = conf.getChild("load", false);
           if (child != null) {
               this.loadResource = new Resource(resolver, child.getAttribute("uri"));
               this.loadResource.setResourceParameters(SourceParameters.create(child));
           }
   
           // get save resource (optional)
  -        child = AvalonUtil.getChild(conf, "save");
  +        child = conf.getChild("save", false);
           if (child != null) {
               this.saveResource = new Resource(resolver, child.getAttribute("uri"));
               this.saveResource.setResourceParameters(SourceParameters.create(child));
           }
   
           // get load-users resource (optional)
  -        child = AvalonUtil.getChild(conf, "load-users");
  +        child = conf.getChild("load-users", false);
           if (child != null) {
               this.loadUsersResource = new Resource(resolver, child.getAttribute("uri"));
               this.loadUsersResource.setResourceParameters(SourceParameters.create(child));
           }
   
           // get load-roles resource (optional)
  -        child = AvalonUtil.getChild(conf, "load-roles");
  +        child = conf.getChild("load-roles", false);
           if (child != null) {
               this.loadRolesResource = new Resource(resolver, child.getAttribute("uri"));
               this.loadRolesResource.setResourceParameters(SourceParameters.create(child));
           }
   
           // get new user resource (optional)
  -        child = AvalonUtil.getChild(conf, "new-user");
  +        child = conf.getChild("new-user", false);
           if (child != null) {
               this.newUserResource = new Resource(resolver, child.getAttribute("uri"));
               this.newUserResource.setResourceParameters(SourceParameters.create(child));
           }
   
           // get new role resource (optional)
  -        child = AvalonUtil.getChild(conf, "new-role");
  +        child = conf.getChild("new-role", false);
           if (child != null) {
               this.newRoleResource = new Resource(resolver, child.getAttribute("uri"));
               this.newRoleResource.setResourceParameters(SourceParameters.create(child));
           }
   
           // get delete user resource (optional)
  -        child = AvalonUtil.getChild(conf, "delete-user");
  +        child = conf.getChild("delete-user", false);
           if (child != null) {
               this.deleteUserResource = new Resource(resolver, child.getAttribute("uri"));
               this.deleteUserResource.setResourceParameters(SourceParameters.create(child));
           }
   
           // get delete role resource (optional)
  -        child = AvalonUtil.getChild(conf, "delete-role");
  +        child = conf.getChild("delete-role", false);
           if (child != null) {
               this.deleteRoleResource = new Resource(resolver, child.getAttribute("uri"));
               this.deleteRoleResource.setResourceParameters(SourceParameters.create(child));
           }
   
           // get change user resource (optional)
  -        child = AvalonUtil.getChild(conf, "change-user");
  +        child = conf.getChild("change-user", false);
           if (child != null) {
               this.changeUserResource = new Resource(resolver, child.getAttribute("uri"));
               this.changeUserResource.setResourceParameters(SourceParameters.create(child));
           }
   
           // And now: Applications
  -        child = AvalonUtil.getChild(conf, "applications");
  +        child = conf.getChild("applications", false);
           if (child != null) {
               Configuration[] appConfs = child.getChildren("application");
               Configuration appconf;
  
  
  
  1.4       +3 -4      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/SunRise.java
  
  Index: SunRise.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunrise/SunRise.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SunRise.java	11 Mar 2002 11:15:26 -0000	1.3
  +++ SunRise.java	13 Mar 2002 15:45:30 -0000	1.4
  @@ -89,7 +89,6 @@
   import org.apache.cocoon.sunshine.connector.Resource;
   import org.apache.cocoon.xml.IncludeXMLConsumer;
   import org.apache.cocoon.sunshine.xml.XMLUtil;
  -import org.apache.cocoon.sunshine.util.AvalonUtil;
   import org.apache.cocoon.sunshine.sunrise.context.SessionContextImpl;
   import org.apache.cocoon.sunshine.sunrise.context.SessionContextProviderImpl;
   
  @@ -97,7 +96,7 @@
    *  This is the basis sunShine component.
    *
    * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  - * @version CVS $Id: SunRise.java,v 1.3 2002/03/11 11:15:26 cziegeler Exp $
  + * @version CVS $Id: SunRise.java,v 1.4 2002/03/13 15:45:30 cziegeler Exp $
   */
   public final class SunRise
   extends AbstractSunShineComponent
  @@ -221,7 +220,7 @@
       public void configure(Configuration myConfiguration)
       throws ConfigurationException {
           // no sync required
  -        Configuration mediaConf = AvalonUtil.getChild(myConfiguration, "mediatypes");
  +        Configuration mediaConf = myConfiguration.getChild("mediatypes", false);
           if (mediaConf == null) throw new ConfigurationException("sunRise needs mediatypes configuration");
           this.defaultMediaType = mediaConf.getAttribute("default");
           this.mediaTypeNames = new String[1];
  @@ -271,7 +270,7 @@
               try {
                   this.configuredHandlers = new Hashtable(3, 2);
   
  -                Configuration handlersConfiguration = AvalonUtil.getChild(configuration, "handlers");
  +                Configuration handlersConfiguration = configuration.getChild("handlers", false);
                   Configuration currentHandlerConf;
   
                   if (handlersConfiguration != null) {
  
  
  
  1.4       +24 -25    xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/SunSpot.java
  
  Index: SunSpot.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunspot/SunSpot.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SunSpot.java	11 Mar 2002 11:15:26 -0000	1.3
  +++ SunSpot.java	13 Mar 2002 15:45:30 -0000	1.4
  @@ -80,7 +80,6 @@
   import org.apache.cocoon.sunshine.context.SessionContext;
   import org.apache.cocoon.sunshine.context.SessionContextProvider;
   import org.apache.cocoon.xml.IncludeXMLConsumer;
  -import org.apache.cocoon.sunshine.util.AvalonUtil;
   import org.apache.cocoon.sunshine.xml.XMLUtil;
   import org.apache.cocoon.sunshine.sunrise.SunRise;
   import org.apache.cocoon.sunshine.sunspot.context.SessionContextProviderImpl;
  @@ -105,7 +104,7 @@
    *  This is the basis sunSpot component
    *
    * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  - * @version CVS $Id: SunSpot.java,v 1.3 2002/03/11 11:15:26 cziegeler Exp $
  + * @version CVS $Id: SunSpot.java,v 1.4 2002/03/13 15:45:30 cziegeler Exp $
   */
   public final class SunSpot
   extends AbstractSunShineComponent {
  @@ -3280,26 +3279,26 @@
                           }
                           result = new HashMap(10, 2);
                           // auth-redirect (optional)
  -                        config = AvalonUtil.getChild(conf, "auth-redirect");
  +                        config = conf.getChild("auth-redirect", false);
                           if (config != null) {
                               result.put(Constants.CONF_AUTH_REDIRECT, config.getValue());
                           }
   
                           // portal-uri (required)
  -                        config = AvalonUtil.getChild(conf, "portal-uri");
  +                        config = conf.getChild("portal-uri", false);
                           if (config == null) {
                               throw new ProcessingException("sunSpot: portal-uri required for application '"+appName+"'");
                           }
                           result.put(Constants.CONF_PORTAL_URI, config.getValue());
   
                           // profile-cache (optional)
  -                        config = AvalonUtil.getChild(conf, "profile-cache");
  +                        config = conf.getChild("profile-cache", false);
                           if (config != null && config.getValueAsBoolean() == true) {
                               result.put(Constants.CONF_PROFILE_CACHE, appName);
                           }
   
                           // parallel sunlets
  -                        config = AvalonUtil.getChild(conf, "process-sunlets-parallel");
  +                        config = conf.getChild("process-sunlets-parallel", false);
                           if (config != null) {
                               result.put(Constants.CONF_PARALLEL_SUNLETS, new Boolean(config.getValueAsBoolean(false)));
                           } else {
  @@ -3307,7 +3306,7 @@
                           }
   
                           // timeout
  -                        config = AvalonUtil.getChild(conf, "default-sunlet-timeout");
  +                        config = conf.getChild("default-sunlet-timeout", false);
                           if (config != null) {
                               result.put(Constants.CONF_SUNLET_TIMEOUT, new Long(config.getValueAsLong(600000)));
                           } else {
  @@ -3315,109 +3314,109 @@
                           }
   
                           // and now the profile
  -                        config = AvalonUtil.getChild(conf, "profile");
  +                        config = conf.getChild("profile", false);
                           if (config == null) throw new ProcessingException("sunSpot: profile configuration required for application '" + appName + "'");
                           Configuration child;
   
                           // build resource (optional)
  -                        child = AvalonUtil.getChild(config, "buildprofile");
  +                        child = config.getChild("buildprofile", false);
                           if (child != null) {
                               result.put(Constants.CONF_BUILD_RESOURCE, new Resource(this.resolver,
                                                                                      child.getAttribute("uri")));
                           }
   
                           // base resource, type is optional
  -                        child = AvalonUtil.getChild(config, "layout-base");
  +                        child = config.getChild("layout-base", false);
                           if (child == null) {
                               throw new ProcessingException("sunSpot: layout-base required for application '" + appName + "'");
                           }
                           result.put(Constants.CONF_LAYOUTBASE_RESOURCE, new Resource(this.resolver,
                                                                                       child.getAttribute("uri")));
  -                        child = AvalonUtil.getChild(config, "sunlet-base");
  +                        child = config.getChild("sunlet-base", false);
                           if (child == null) {
                               throw new ProcessingException("sunSpot: sunlet-base required for application '" + appName + "'");
                           }
                           result.put(Constants.CONF_SUNLETBASE_RESOURCE, new Resource(this.resolver,
                                                                                       child.getAttribute("uri")));
  -                        child = AvalonUtil.getChild(config, "type-base");
  +                        child = config.getChild("type-base", false);
                           if (child != null) {
                               result.put(Constants.CONF_TYPEBASE_RESOURCE, new Resource(this.resolver,
                                                                                         child.getAttribute("uri")));
                           }
   
                           // sunlet base save (is optional)
  -                        child = AvalonUtil.getChild(config, "sunlet-base-save");
  +                        child = config.getChild("sunlet-base-save", false);
                           if (child != null) {
                               result.put(Constants.CONF_SUNLETBASE_SAVE_RESOURCE, new Resource(this.resolver,
                                                                                                child.getAttribute("uri")));
                           }
   
                           // global delta (load required)
  -                        child = AvalonUtil.getChild(config, "global-delta-load");
  +                        child = config.getChild("global-delta-load", false);
                           if (child == null) {
                               throw new ProcessingException("sunSpot: global-delta-load required for application '" + appName + "'");
                           }
                           result.put(Constants.CONF_GLOBALDELTA_LOADRESOURCE, new Resource(this.resolver,
                                                                                            child.getAttribute("uri")));
  -                        child = AvalonUtil.getChild(config, "global-delta-save");
  +                        child = config.getChild("global-delta-save", false);
                           if (child != null) {
                               result.put(Constants.CONF_GLOBALDELTA_SAVERESOURCE, new Resource(this.resolver,
                                                                                                child.getAttribute("uri")));
                           }
  -                        child = AvalonUtil.getChild(config, "global-type-delta");
  +                        child = config.getChild("global-type-delta", false);
                           if (child != null) {
                               result.put(Constants.CONF_GLOBALDELTA_TYPERESOURCE, new Resource(this.resolver,
                                                                                                child.getAttribute("uri")));
                           }
   
                           // role delta (optional)
  -                        child = AvalonUtil.getChild(config, "role-delta-load");
  +                        child = config.getChild("role-delta-load", false);
                           if (child != null) {
                               result.put(Constants.CONF_ROLEDELTA_LOADRESOURCE, new Resource(this.resolver,
                                                                                              child.getAttribute("uri")));
                           }
  -                        child = AvalonUtil.getChild(config, "role-delta-save");
  +                        child = config.getChild("role-delta-save", false);
                           if (child != null) {
                               result.put(Constants.CONF_ROLEDELTA_SAVERESOURCE, new Resource(this.resolver,
                                                                                              child.getAttribute("uri")));
                           }
  -                        child = AvalonUtil.getChild(config, "role-type-delta");
  +                        child = config.getChild("role-type-delta", false);
                           if (child != null) {
                               result.put(Constants.CONF_ROLEDELTA_TYPERESOURCE, new Resource(this.resolver,
                                                                                              child.getAttribute("uri")));
                           }
   
                           // User delta
  -                        child = AvalonUtil.getChild(config, "user-delta-load");
  +                        child = config.getChild("user-delta-load", false);
                           if (child != null) {
                               result.put(Constants.CONF_USERDELTA_LOADRESOURCE, new Resource(this.resolver,
                                                                                              child.getAttribute("uri")));
                           }
  -                        child = AvalonUtil.getChild(config, "user-delta-save");
  +                        child = config.getChild("user-delta-save", false);
                           if (child != null) {
                               result.put(Constants.CONF_USERDELTA_SAVERESOURCE, new Resource(this.resolver,
                                                                                              child.getAttribute("uri")));
                           }
  -                        child = AvalonUtil.getChild(config, "user-type-delta");
  +                        child = config.getChild("user-type-delta", false);
                           if (child != null) {
                               result.put(Constants.CONF_USERDELTA_TYPERESOURCE, new Resource(this.resolver,
                                                                                              child.getAttribute("uri")));
                           }
   
                           // Personal information
  -                        child = AvalonUtil.getChild(config, "user-status-load");
  +                        child = config.getChild("user-status-load", false);
                           if (child != null) {
                               result.put(Constants.CONF_STATUS_LOADRESOURCE, new Resource(this.resolver,
                                                                                           child.getAttribute("uri")));
                           }
  -                        child = AvalonUtil.getChild(config, "user-status-save");
  +                        child = config.getChild("user-status-save", false);
                           if (child != null) {
                               result.put(Constants.CONF_STATUS_SAVERESOURCE, new Resource(this.resolver,
                                                                                           child.getAttribute("uri")));
                           }
   
                           // Admin Type profil
  -                        child = AvalonUtil.getChild(config, "admin-type-base");
  +                        child = config.getChild("admin-type-base", false);
                           if (child != null) {
                               result.put(Constants.CONF_ADMIN_TYPE_BASE, new Resource(this.resolver,
                                                                                       child.getAttribute("uri")));
  
  
  
  1.3       +2 -3      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/transformation/SunShinePreTransformer.java
  
  Index: SunShinePreTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/transformation/SunShinePreTransformer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SunShinePreTransformer.java	22 Feb 2002 06:57:19 -0000	1.2
  +++ SunShinePreTransformer.java	13 Mar 2002 15:45:30 -0000	1.3
  @@ -60,7 +60,6 @@
   import org.apache.cocoon.environment.SourceResolver;
   import org.apache.cocoon.sunshine.SunShineConstants;
   import org.apache.cocoon.sunshine.connector.*;
  -import org.apache.cocoon.sunshine.util.AvalonUtil;
   import org.apache.cocoon.sunshine.xml.XMLUtil;
   
   import org.xml.sax.Attributes;
  @@ -74,7 +73,7 @@
    * pipeline.
    *
    * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  - * @version CVS $Id: SunShinePreTransformer.java,v 1.2 2002/02/22 06:57:19 cziegeler Exp $
  + * @version CVS $Id: SunShinePreTransformer.java,v 1.3 2002/03/13 15:45:30 cziegeler Exp $
   */
   public class SunShinePreTransformer
   extends SunShineConnectTransformer {
  @@ -130,7 +129,7 @@
       public void configure(Configuration conf)
       throws ConfigurationException {
           super.configure(conf);
  -        Configuration lnkResConf = AvalonUtil.getChild(conf, "link-resource");
  +        Configuration lnkResConf = conf.getChild("link-resource", false);
           if (lnkResConf != null) {
               linkResource = lnkResConf.getAttribute("uri");
           }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org