Return-Path: X-Original-To: apmail-cocoon-cvs-archive@www.apache.org Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4B7E875E9 for ; Tue, 1 Nov 2011 13:20:19 +0000 (UTC) Received: (qmail 25814 invoked by uid 500); 1 Nov 2011 13:20:19 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 25764 invoked by uid 500); 1 Nov 2011 13:20:19 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 25757 invoked by uid 99); 1 Nov 2011 13:20:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 13:20:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 13:20:16 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 0EB3123888FE for ; Tue, 1 Nov 2011 13:19:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1195983 - /cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/PipelineHelpRule.java Date: Tue, 01 Nov 2011 13:19:54 -0000 To: cvs@cocoon.apache.org From: simonetripodi@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111101131955.0EB3123888FE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 + { + + 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