cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1196101 - in /cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli: PipelineHelpModule.java PipelineHelpRule.java PipelinesHelpRule.java
Date Tue, 01 Nov 2011 16:30:50 GMT
Author: simonetripodi
Date: Tue Nov  1 16:30:50 2011
New Revision: 1196101

URL: http://svn.apache.org/viewvc?rev=1196101&view=rev
Log:
decorated the helper output

Added:
    cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelinesHelpRule.java
  (with props)
Modified:
    cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelineHelpModule.java
    cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelineHelpRule.java

Modified: cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelineHelpModule.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelineHelpModule.java?rev=1196101&r1=1196100&r2=1196101&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelineHelpModule.java
(original)
+++ cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelineHelpModule.java
Tue Nov  1 16:30:50 2011
@@ -19,6 +19,7 @@
 package org.apache.cocoon.cli;
 
 import org.apache.cocoon.cli.PipelineHelpRule.PipelineHelpRuleProvider;
+import org.apache.cocoon.cli.PipelinesHelpRule.PipelinesHelpRuleProvider;
 import org.apache.commons.digester3.binder.AbstractRulesModule;
 
 /**
@@ -31,6 +32,7 @@ final class PipelineHelpModule
     @Override
     protected void configure()
     {
+        forPattern( "pipelines" ).addRuleCreatedBy( new PipelinesHelpRuleProvider() );
         forPattern( "pipelines/pipeline" ).addRuleCreatedBy( new PipelineHelpRuleProvider()
);
     }
 

Modified: cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelineHelpRule.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelineHelpRule.java?rev=1196101&r1=1196100&r2=1196101&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelineHelpRule.java
(original)
+++ cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelineHelpRule.java
Tue Nov  1 16:30:50 2011
@@ -43,7 +43,7 @@ final class PipelineHelpRule
     public void begin( String namespace, String name, Attributes attributes )
         throws Exception
     {
-        logger.info( "{} ({}) - {}",
+        logger.info( "    {} ({}) - {}",
                      new Object[] {
                          attributes.getValue( ID ),
                          attributes.getValue( TYPE ),

Added: cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelinesHelpRule.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelinesHelpRule.java?rev=1196101&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelinesHelpRule.java
(added)
+++ cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelinesHelpRule.java
Tue Nov  1 16:30:50 2011
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cocoon.cli;
+
+import org.apache.commons.digester3.Rule;
+import org.apache.commons.digester3.binder.RuleProvider;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.xml.sax.Attributes;
+
+/**
+ * Prints pipeline information.
+ */
+final class PipelinesHelpRule
+    extends Rule
+{
+
+    private final Logger logger = LoggerFactory.getLogger( getClass() );
+
+    private static final String NAME = "name";
+
+    private static final String DEFAULT = "default";
+
+    @Override
+    public void begin( String namespace, String name, Attributes attributes )
+        throws Exception
+    {
+        logger.info( "Apache Cocoon 3 - Pipeline '{}' (default: {})",
+                     new Object[] {
+                         attributes.getValue( NAME ),
+                         attributes.getValue( DEFAULT )
+                     } );
+    }
+
+    public static class PipelinesHelpRuleProvider
+        implements RuleProvider<PipelinesHelpRule>
+    {
+
+        public PipelinesHelpRule get()
+        {
+            return new PipelinesHelpRule();
+        }
+
+    }
+
+}

Propchange: cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelinesHelpRule.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelinesHelpRule.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelinesHelpRule.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message