forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r703159 - in /forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher: config/DispatcherBean.java transformation/DispatcherTransformer.java
Date Thu, 09 Oct 2008 13:08:18 GMT
Author: thorsten
Date: Thu Oct  9 06:08:18 2008
New Revision: 703159

URL: http://svn.apache.org/viewvc?rev=703159&view=rev
Log:
Adding much more javadoc

Modified:
    forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/config/DispatcherBean.java
    forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/config/DispatcherBean.java
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/config/DispatcherBean.java?rev=703159&r1=703158&r2=703159&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/config/DispatcherBean.java
(original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/config/DispatcherBean.java
Thu Oct  9 06:08:18 2008
@@ -29,58 +29,144 @@
  */
 public class DispatcherBean {
   
-  private boolean allowXmlProperties = false;
   private boolean shrink=true;
+  /**
+   * If you use properties like 
+   * <code>&lt;forrest:property name="theme" value="pelt"/></code><p>
+   * There is no real need to pass the element as whole it is sufficient 
+   * to pass a simple string (@value). <p>
+   * If you set it to true we will pass a simple string to the transformation
+   * in the form of key=@name, value=@value.<p>
+   * If set to false then we pass the whole element.
+   * @return whether we pass empty properties element as simple string (true) or as w3c element
(false)
+   */
   public boolean isShrink() {
     return shrink;
   }
 
+  /**
+   * If you use properties like 
+   * <code>&lt;forrest:property name="theme" value="pelt"/></code><p>
+   * There is no real need to pass the element as whole it is sufficient 
+   * to pass a simple string (@value). <p>
+   * If you set it to true we will pass a simple string to the transformation
+   * in the form of key=@name, value=@value.<p>
+   * If set to false then we pass the whole element.
+   * @param shrink whether we pass empty properties element as simple string (true) or as
w3c element (false)
+   */
   public void setShrink(boolean shrink) {
     this.shrink = shrink;
   }
-
-  private Resolver resolver = null;
-  private URIResolver uriResolver = null;
-
-  private String contractUriPrefix = "";
-  private String contractUriSufix = ".contract.xml";
   
+  
+  private boolean allowXmlProperties = false;
+  /**
+   * If you want to use inline xml for contract properties be aware that setting 
+   * this properties to true will have negative influence on performance since 
+   * this feature needs to use DOM parsing!<p>
+   *
+   * We strongly recommend to rewrite your contracts and structurer to use simple 
+   * string for the properties.<p>
+   * Whether we allow that <code>&lt;forrest:property> elements can
+   * have children or not. 
+   * @return Whether we allow that <code>&lt;forrest:property> elements can
+   * have children or not. 
+   */
   public boolean isAllowXmlProperties() {
     return allowXmlProperties;
   }
-
+  /**
+   * If you want to use inline xml for contract properties be aware that setting 
+   * this properties to true will have negative influence on performance since 
+   * this feature needs to use DOM parsing!<p>
+   *
+   * We strongly recommend to rewrite your contracts and structurer to use simple 
+   * string for the properties.<p>
+   * Whether we allow that <code>&lt;forrest:property> elements can
+   * have children or not. 
+   * @param Whether we allow that <code>&lt;forrest:property> elements can
+   * have children or not. 
+   */
   public void setAllowXmlProperties(boolean allowXmlProperties) {
     this.allowXmlProperties = allowXmlProperties;
   }
+  
 
+  private Resolver resolver = null;
+  /**
+   * Wrapper interface to enable multible resolver implementation this makes it
+ * possible to use the dispatcher outside of cocoon as standalone application
+ * without any mayor rewrites.
+   * @return the currently configured resolver
+   */
   public Resolver getResolver() {
     return resolver;
   }
-
+  /**
+   * Wrapper interface to enable multible resolver implementation this makes it
+ * possible to use the dispatcher outside of cocoon as standalone application
+ * without any mayor rewrites.
+   * @param the currently configured resolver
+   */
   public void setResolver(Resolver resolver) {
     this.resolver = resolver;
   }
 
+  
+  private String contractUriPrefix = "";
+  /**
+   * If you want to change the uri prefix of the contracts. 
+   * This may be interesting if you work with a contract repository rather then
+   * with the ones from the themer plugin. 
+   * @return prefix of the contracts
+   */
   public String getContractUriPrefix() {
     return contractUriPrefix;
   }
-
+  /**
+   * If you want to change the uri prefix of the contracts. 
+   * This may be interesting if you work with a contract repository rather then
+   * with the ones from the themer plugin. 
+   * @param prefix of the contracts
+   */
   public void setContractUriPrefix(String contractUriPrefix) {
     this.contractUriPrefix = contractUriPrefix;
   }
-
+  
+  private String contractUriSufix = ".contract.xml";
+  /**
+   * If you want to change the uri suffix of the contracts. 
+   * This may be interesting if you work with a contract repository rather then
+   * with the ones from the themer plugin. 
+   * @return suffix of the contracts
+   */
   public String getContractUriSufix() {
     return contractUriSufix;
   }
-
+  /**
+   * If you want to change the uri suffix of the contracts. 
+   * This may be interesting if you work with a contract repository rather then
+   * with the ones from the themer plugin. 
+   * @param suffix of the contracts
+   */
   public void setContractUriSufix(String contractUriSufix) {
     this.contractUriSufix = contractUriSufix;
   }
 
+  private URIResolver uriResolver = null;
+  /**
+   * <p>An object that can be called by the xsl processor
+   * to turn a URI used in document(), xsl:import, or xsl:include into a Source object.
+   * @param uriResolver the uriResolver currently configured
+   */
   public void setUriResolver(URIResolver uriResolver) {
     this.uriResolver = uriResolver;
   }
-
+  /**
+   * <p>An object that can be called by the xsl processor
+   * to turn a URI used in document(), xsl:import, or xsl:include into a Source object.
+   * @return uriResolver the uriResolver currently configured
+   */
   public URIResolver getUriResolver() {
     return uriResolver;
   }

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java?rev=703159&r1=703158&r2=703159&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
(original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
Thu Oct  9 06:08:18 2008
@@ -81,9 +81,16 @@
 
   /**
    * The requested format.
+   * <p>
+   * Used to identify the structure to process
    */
   private String requestedFormat;
   
+  /**
+   * The requested id.
+   * <p>
+   * Used to request the corresponding properties file for the request
+   */
   private String requestId;
 
   /**
@@ -94,6 +101,10 @@
   private SourceValidity validity;
 
   private String validityChecking;
+  
+  /**
+   * Resolver which will be used for uri resolving
+   */
 
   private org.apache.excalibur.source.SourceResolver m_resolver;
   
@@ -128,7 +139,7 @@
   private Logger log;
   
   /**
-   * Main configuration bean of the dispatcher.
+   * Main configuration bean of the dispatcher.<p>
    * This config will control things like 
    * <li>contract prefixes/suffixes
    * <li>resolver to use
@@ -136,19 +147,29 @@
   private DispatcherBean config;
 
   /**
-   * The level of xpath support we need.
+   * The level of xpath support we need.<p>
    * If you choose enhanced you can inject/create node
    * with enhanced xpath expression like e.g. 
    * /root/child[id='test']
-   * 
+   * <p>
    * Supported values are: basic | enhanced
    */
   private String xpathSupport;
 
+  /**
+   * The prefix that we need to use to resolve a concrete contract.
+   */
   private String contractUriPrefix;
 
+  /**
+   * The parameter caption use to pass the requestId from the
+   * sitemap to the contract
+   */
   public static final String DISPATCHER_REQUEST_ATTRIBUTE = "request";
 
+  /**
+   * The caption of the key for the default variables
+   */
   private static final String DEFAULT_VARIABLES = "defaultVariables";
   
   /*



Mime
View raw message