Return-Path: X-Original-To: apmail-onami-commits-archive@minotaur.apache.org Delivered-To: apmail-onami-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A1573D82B for ; Sun, 2 Dec 2012 23:47:37 +0000 (UTC) Received: (qmail 70069 invoked by uid 500); 2 Dec 2012 23:47:37 -0000 Delivered-To: apmail-onami-commits-archive@onami.apache.org Received: (qmail 70030 invoked by uid 500); 2 Dec 2012 23:47:37 -0000 Mailing-List: contact commits-help@onami.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@onami.incubator.apache.org Delivered-To: mailing list commits@onami.incubator.apache.org Received: (qmail 69976 invoked by uid 99); 2 Dec 2012 23:47:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Dec 2012 23:47:37 +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; Sun, 02 Dec 2012 23:47:12 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 94CC7238896F; Sun, 2 Dec 2012 23:46:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1416305 [10/17] - in /incubator/onami/site/lifecycle: ./ apidocs/ apidocs/assets/ apidocs/assets/images/ apidocs/reference/ apidocs/reference/org/ apidocs/reference/org/apache/ apidocs/reference/org/apache/onami/ apidocs/reference/org/apac... Date: Sun, 02 Dec 2012 23:46:17 -0000 To: commits@onami.incubator.apache.org From: olamy@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121202234625.94CC7238896F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: incubator/onami/site/lifecycle/cobertura/org.apache.onami.lifecycle.DisposeModule.html URL: http://svn.apache.org/viewvc/incubator/onami/site/lifecycle/cobertura/org.apache.onami.lifecycle.DisposeModule.html?rev=1416305&view=auto ============================================================================== --- incubator/onami/site/lifecycle/cobertura/org.apache.onami.lifecycle.DisposeModule.html (added) +++ incubator/onami/site/lifecycle/cobertura/org.apache.onami.lifecycle.DisposeModule.html Sun Dec 2 23:46:07 2012 @@ -0,0 +1,182 @@ + + + + +Coverage Report + + + + +
Coverage Report - org.apache.onami.lifecycle.DisposeModule
+
 
+ + + + + + +
Classes in this File Line Coverage Branch Coverage Complexity
DisposeModule
75 %
6/8
N/A
1
DisposeModule$1
100 %
3/3
N/A
1
DisposeModule$1$1
100 %
3/3
N/A
1
+
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 1  
 package org.apache.onami.lifecycle;
 2  
 
 3  
 /*
 4  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 5  
  * contributor license agreements.  See the NOTICE file distributed with
 6  
  * this work for additional information regarding copyright ownership.
 7  
  * The ASF licenses this file to You under the Apache License, Version 2.0
 8  
  * (the "License"); you may not use this file except in compliance with
 9  
  * the License.  You may obtain a copy of the License at
 10  
  *
 11  
  *  http://www.apache.org/licenses/LICENSE-2.0
 12  
  *
 13  
  * Unless required by applicable law or agreed to in writing, software
 14  
  * distributed under the License is distributed on an "AS IS" BASIS,
 15  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 16  
  * See the License for the specific language governing permissions and
 17  
  * limitations under the License.
 18  
  */
 19  
 
 20  
 import java.lang.annotation.Annotation;
 21  
 import java.lang.reflect.Method;
 22  
 
 23  
 import com.google.inject.matcher.Matcher;
 24  
 import com.google.inject.spi.InjectionListener;
 25  
 import com.google.inject.spi.TypeEncounter;
 26  
 
 27  
 /**
 28  
  * Guice module to register methods to be invoked when {@link Disposer#dispose()} is invoked.
 29  
  */
 30  
 public final class DisposeModule
 31  
     extends AbstractLifeCycleModule
 32  
 {
 33  
 
 34  
     /**
 35  
      * Creates a new module which register methods annotated with {@link Dispose} on methods in any type.
 36  
      */
 37  
     public DisposeModule()
 38  
     {
 39  5
         super( Dispose.class );
 40  5
     }
 41  
 
 42  
     /**
 43  
      * Creates a new module which register methods annotated with input annotation on methods
 44  
      * in types filtered by the input matcher.
 45  
      *
 46  
      * @param disposeAnnotationType the <i>Dispose</i> annotation to be searched.
 47  
      * @param typeMatcher the filter for injectee types.
 48  
      */
 49  
     public <A extends Annotation> DisposeModule( Class<A> disposeAnnotationType,
 50  
                                                  Matcher<Object> typeMatcher )
 51  
     {
 52  0
         super( disposeAnnotationType, typeMatcher );
 53  0
     }
 54  
 
 55  
     /**
 56  
      * {@inheritDoc}
 57  
      */
 58  
     @Override
 59  
     protected void configure()
 60  
     {
 61  5
         final Disposer disposer = new Disposer();
 62  
 
 63  5
         bind( Disposer.class ).toInstance( disposer );
 64  
 
 65  5
         bindListener( getTypeMatcher(), new AbstractMethodTypeListener( getAnnotationType() )
 66  5
         {
 67  
 
 68  
             @Override
 69  
             protected <I> void hear( final Method disposeMethod, TypeEncounter<I> encounter )
 70  
             {
 71  5
                 encounter.register( new InjectionListener<I>()
 72  5
                 {
 73  
 
 74  
                     public void afterInjection( I injectee )
 75  
                     {
 76  4
                         disposer.register( disposeMethod, injectee );
 77  4
                     }
 78  
 
 79  
                 } );
 80  5
             }
 81  
 
 82  
         } );
 83  5
     }
 84  
 
 85  
 }
+ + + + \ No newline at end of file Propchange: incubator/onami/site/lifecycle/cobertura/org.apache.onami.lifecycle.DisposeModule.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/onami/site/lifecycle/cobertura/org.apache.onami.lifecycle.DisposeModule.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: incubator/onami/site/lifecycle/cobertura/org.apache.onami.lifecycle.Disposer.html URL: http://svn.apache.org/viewvc/incubator/onami/site/lifecycle/cobertura/org.apache.onami.lifecycle.Disposer.html?rev=1416305&view=auto ============================================================================== --- incubator/onami/site/lifecycle/cobertura/org.apache.onami.lifecycle.Disposer.html (added) +++ incubator/onami/site/lifecycle/cobertura/org.apache.onami.lifecycle.Disposer.html Sun Dec 2 23:46:07 2012 @@ -0,0 +1,315 @@ + + + + +Coverage Report + + + + +
Coverage Report - org.apache.onami.lifecycle.Disposer
+
 
+ + + + + + + +
Classes in this File Line Coverage Branch Coverage Complexity
Disposer
91 %
11/12
75 %
3/4
1,714
Disposer$1
N/A
N/A
1,714
Disposer$Disposable
69 %
9/13
N/A
1,714
Disposer$NoOpDisposeHandler
33 %
1/3
N/A
1,714
+
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 1  
 package org.apache.onami.lifecycle;
 2  
 
 3  
 /*
 4  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 5  
  * contributor license agreements.  See the NOTICE file distributed with
 6  
  * this work for additional information regarding copyright ownership.
 7  
  * The ASF licenses this file to You under the Apache License, Version 2.0
 8  
  * (the "License"); you may not use this file except in compliance with
 9  
  * the License.  You may obtain a copy of the License at
 10  
  *
 11  
  *  http://www.apache.org/licenses/LICENSE-2.0
 12  
  *
 13  
  * Unless required by applicable law or agreed to in writing, software
 14  
  * distributed under the License is distributed on an "AS IS" BASIS,
 15  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 16  
  * See the License for the specific language governing permissions and
 17  
  * limitations under the License.
 18  
  */
 19  
 
 20  
 import java.lang.reflect.InvocationTargetException;
 21  
 import java.lang.reflect.Method;
 22  
 import java.util.LinkedList;
 23  
 import java.util.List;
 24  
 
 25  
 /**
 26  
  * A Disposer is a mini-container that releases resources
 27  
  * invoking injectees methods annotated by {@code Dispose}.
 28  
  */
 29  5
 public final class Disposer
 30  
 {
 31  
 
 32  
     /**
 33  
      * List of elements have to be disposed.
 34  
      */
 35  5
     private final List<Disposable> disposables = new LinkedList<Disposable>();
 36  
 
 37  
     /**
 38  
      * Register an injectee and its related method to release resources.
 39  
      *
 40  
      * @param disposeMethod the method to be invoked to release resources
 41  
      * @param injectee the target injectee has to release the resources
 42  
      */
 43  
     <I> void register( Method disposeMethod, I injectee )
 44  
     {
 45  4
         disposables.add( new Disposable( disposeMethod, injectee ) );
 46  4
     }
 47  
 
 48  
     /**
 49  
      * Releases resources invoking the {@code Dispose} annotated methods,
 50  
      * successes/errors will be muted.
 51  
      */
 52  
     public void dispose()
 53  
     {
 54  1
         dispose( new NoOpDisposeHandler() );
 55  1
     }
 56  
 
 57  
     /**
 58  
      * Releases resources invoking the {@code Dispose} annotated methods,
 59  
      * successes/errors will be tracked in the input {@link DisposeHandler}.
 60  
      *
 61  
      * @param disposeHandler the DisposeHandler instance that tracks dispose progresses.
 62  
      */
 63  
     public void dispose( DisposeHandler disposeHandler )
 64  
     {
 65  2
         if ( disposeHandler == null )
 66  
         {
 67  0
             disposeHandler = new NoOpDisposeHandler();
 68  
         }
 69  
 
 70  2
         for ( Disposable disposable : disposables )
 71  
         {
 72  2
             disposable.dispose( disposeHandler );
 73  
         }
 74  2
     }
 75  
 
 76  
     /**
 77  
      * NOOP {@code DisposeHandler} implementation.
 78  
      */
 79  2
     private static final class NoOpDisposeHandler
 80  
         implements DisposeHandler
 81  
     {
 82  
 
 83  
         /**
 84  
          * {@inheritDoc}
 85  
          */
 86  
         public <I, E extends Throwable> void onError( I injectee, E error )
 87  
         {
 88  
             // do nothing
 89  0
         }
 90  
 
 91  
         /**
 92  
          * {@inheritDoc}
 93  
          */
 94  
         public <I> void onSuccess( I injectee )
 95  
         {
 96  
             // do nothing
 97  0
         }
 98  
 
 99  
     }
 100  
 
 101  
     /**
 102  
      * A {@code Disposable} is a reference to a disposable injectee and related method to release resources.
 103  
      */
 104  5
     private static final class Disposable
 105  
     {
 106  
 
 107  
         /**
 108  
          * The method to be invoked to release resources.
 109  
          */
 110  
         private final Method disposeMethod;
 111  
 
 112  
         /**
 113  
          * The target injectee has to release the resources.
 114  
          */
 115  
         private final Object injectee;
 116  
 
 117  
         /**
 118  
          * Creates a new {@code Disposable} reference.
 119  
          *
 120  
          * @param disposeMethod the method to be invoked to release resources
 121  
          * @param injectee the target injectee has to release the resources
 122  
          */
 123  
         public Disposable( Method disposeMethod, Object injectee )
 124  4
         {
 125  4
             this.disposeMethod = disposeMethod;
 126  4
             this.injectee = injectee;
 127  4
         }
 128  
 
 129  
         /**
 130  
          * Disposes allocated resources by invoking the injectee method
 131  
          * annotated by {@code Dispose}, tracking progresses in the
 132  
          * input {@code DisposeHandler}.
 133  
          *
 134  
          * @param disposeHandler the handler to track dispose progresses.
 135  
          */
 136  
         public void dispose( DisposeHandler disposeHandler )
 137  
         {
 138  
             try
 139  
             {
 140  2
                 disposeMethod.invoke( injectee );
 141  
             }
 142  0
             catch ( IllegalArgumentException e )
 143  
             {
 144  0
                 disposeHandler.onError( injectee, e );
 145  
             }
 146  0
             catch ( IllegalAccessException e )
 147  
             {
 148  0
                 disposeHandler.onError( injectee, e );
 149  
             }
 150  1
             catch ( InvocationTargetException e )
 151  
             {
 152  1
                 disposeHandler.onError( injectee, e.getTargetException() );
 153  1
             }
 154  2
         }
 155  
 
 156  
     }
 157  
 
 158  
 }
+ + + + \ No newline at end of file Propchange: incubator/onami/site/lifecycle/cobertura/org.apache.onami.lifecycle.Disposer.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/onami/site/lifecycle/cobertura/org.apache.onami.lifecycle.Disposer.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: incubator/onami/site/lifecycle/cpd.html URL: http://svn.apache.org/viewvc/incubator/onami/site/lifecycle/cpd.html?rev=1416305&view=auto ============================================================================== --- incubator/onami/site/lifecycle/cpd.html (added) +++ incubator/onami/site/lifecycle/cpd.html Sun Dec 2 23:46:07 2012 @@ -0,0 +1,365 @@ + + + + + + + + + Apache Onami-Lifecycle - CPD Results + + + + + + + + + + + + + +
+ + + + + +
+
+ +
+ + +
+ +

CPD Results

The following document contains the results of PMD's CPD 4.3.

Duplications

CPD found no problems in your source code.

+
+
+
+ +
+ +
+
+
Copyright © 2012 + The Apache Software Foundation. + All Rights Reserved. + +
+ + +
Apache Onami, Apache Onami Lifecycle, Apache, the Apache feather logo, and the Apache Onami project logos are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+ + +
+
+ + \ No newline at end of file Propchange: incubator/onami/site/lifecycle/cpd.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/onami/site/lifecycle/cpd.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: incubator/onami/site/lifecycle/cpd.xml URL: http://svn.apache.org/viewvc/incubator/onami/site/lifecycle/cpd.xml?rev=1416305&view=auto ============================================================================== --- incubator/onami/site/lifecycle/cpd.xml (added) +++ incubator/onami/site/lifecycle/cpd.xml Sun Dec 2 23:46:07 2012 @@ -0,0 +1,3 @@ + + + \ No newline at end of file Propchange: incubator/onami/site/lifecycle/cpd.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/onami/site/lifecycle/cpd.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: incubator/onami/site/lifecycle/css/apache-maven-fluido-1.3.0.min.css URL: http://svn.apache.org/viewvc/incubator/onami/site/lifecycle/css/apache-maven-fluido-1.3.0.min.css?rev=1416305&view=auto ============================================================================== --- incubator/onami/site/lifecycle/css/apache-maven-fluido-1.3.0.min.css (added) +++ incubator/onami/site/lifecycle/css/apache-maven-fluido-1.3.0.min.css Sun Dec 2 23:46:07 2012 @@ -0,0 +1,9 @@ +/*! + * Bootstrap v2.1.0 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. [... 3 lines stripped ...] Propchange: incubator/onami/site/lifecycle/css/apache-maven-fluido-1.3.0.min.css ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/onami/site/lifecycle/css/apache-maven-fluido-1.3.0.min.css ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: incubator/onami/site/lifecycle/css/print.css URL: http://svn.apache.org/viewvc/incubator/onami/site/lifecycle/css/print.css?rev=1416305&view=auto ============================================================================== --- incubator/onami/site/lifecycle/css/print.css (added) +++ incubator/onami/site/lifecycle/css/print.css Sun Dec 2 23:46:07 2012 @@ -0,0 +1,23 @@ +/* + * 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. + */ + +/* $Id$ */ + +#banner, #footer, #leftcol, #breadcrumbs, .docs #toc, .docs .courtesylinks, #leftColumn, #navColumn {display: none !important;} +#bodyColumn, body.docs div.docs {margin: 0 !important;border: none !important} \ No newline at end of file Propchange: incubator/onami/site/lifecycle/css/print.css ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/onami/site/lifecycle/css/print.css ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: incubator/onami/site/lifecycle/css/site.css URL: http://svn.apache.org/viewvc/incubator/onami/site/lifecycle/css/site.css?rev=1416305&view=auto ============================================================================== --- incubator/onami/site/lifecycle/css/site.css (added) +++ incubator/onami/site/lifecycle/css/site.css Sun Dec 2 23:46:07 2012 @@ -0,0 +1 @@ +/* You can override this file with your own styles */ \ No newline at end of file Propchange: incubator/onami/site/lifecycle/css/site.css ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/onami/site/lifecycle/css/site.css ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision