You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by si...@apache.org on 2011/11/01 14:19:54 UTC

svn commit: r1195983 - /cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelineHelpRule.java

Author: simonetripodi
Date: Tue Nov  1 13:19:54 2011
New Revision: 1195983

URL: http://svn.apache.org/viewvc?rev=1195983&view=rev
Log:
first checkin of PipelineHelpRule

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

Added: 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=1195983&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelineHelpRule.java (added)
+++ cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelineHelpRule.java Tue Nov  1 13:19:54 2011
@@ -0,0 +1,66 @@
+/*
+ * 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.cocoon.pipeline.Pipeline;
+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 PipelineHelpRule
+    extends Rule
+{
+
+    private final Logger logger = LoggerFactory.getLogger( getClass() );
+
+    private static final String ID = "id";
+
+    private static final String TYPE = "type";
+
+    private static final String DESCRIPTION = "description";
+
+    @Override
+    public void begin( String namespace, String name, Attributes attributes )
+        throws Exception
+    {
+        logger.info( "{} ({}) - {}",
+                     new Object[] {
+                         attributes.getValue( ID ),
+                         attributes.getValue( TYPE ),
+                         attributes.getValue( DESCRIPTION )
+                     } );
+    }
+
+    public static class PipelineHelpRuleProvider
+        implements RuleProvider<PipelineHelpRule>
+    {
+
+        public PipelineHelpRule get()
+        {
+            return new PipelineHelpRule();
+        }
+
+    }
+
+}

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

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

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