You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2009/08/17 23:48:52 UTC
svn commit: r805162 - in
/maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api:
EnforcerRule.java EnforcerRuleException.java EnforcerRuleHelper.java
Author: hboutemy
Date: Mon Aug 17 21:48:52 2009
New Revision: 805162
URL: http://svn.apache.org/viewvc?rev=805162&view=rev
Log:
fixed errors reported by Checkstyle
Modified:
maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRule.java
maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleException.java
maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleHelper.java
Modified: maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRule.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRule.java?rev=805162&r1=805161&r2=805162&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRule.java (original)
+++ maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRule.java Mon Aug 17 21:48:52 2009
@@ -1,3 +1,5 @@
+package org.apache.maven.enforcer.rule.api;
+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -16,13 +18,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.maven.enforcer.rule.api;
-
-import org.apache.maven.plugin.MojoExecutionException;
/**
* Interface to be implemented by any rules executed by the enforcer.
- *
+ *
* @author <a href="mailto:brianf@apache.org">Brian Fox</a>
* @version $Id$
*/
@@ -34,15 +33,15 @@
* containing a reason message if the rule fails the check. The plugin will
* then decide based on the fail flag if it should stop or just log the
* message as a warning.
- *
+ *
* @param helper The helper provides access to the log, MavenSession and has
* helpers to get common components. It is also able to lookup components
* by class name.
- *
+ *
* @throws MojoExecutionException
* @throws EnforcerRuleException the enforcer rule exception
*/
- public void execute( EnforcerRuleHelper helper )
+ void execute( EnforcerRuleHelper helper )
throws EnforcerRuleException;
/**
@@ -50,28 +49,28 @@
* the results will be remembered for future executions in the same build (ie children). Subsequent
* iterations of the rule will be queried to see if they are also cacheable. This will allow the rule to be
* uncached further down the tree if needed.
- *
+ *
* @return <code>true</code> if rule is cacheable
*/
- public boolean isCacheable();
+ boolean isCacheable();
/**
* Checks if cached result is valid.
- *
+ *
* @param cachedRule the last cached instance of the rule. This is to be used by the rule to
* potentially determine if the results are still valid (ie if the configuration has been overridden)
- *
+ *
* @return <code>true</code> if the stored results are valid for the same id.
*/
- public boolean isResultValid(EnforcerRule cachedRule);
+ boolean isResultValid( EnforcerRule cachedRule );
/**
* If the rule is to be cached, this id is used as part of the key. This can allow rules to take parameters
* that allow multiple results of the same rule to be cached.
- *
+ *
* @return id to be used by the enforcer to determine uniqueness of cache results. The ids only need to be unique
* within a given rule implementation as the full key will be [classname]-[id]
*/
- public String getCacheId();
+ String getCacheId();
}
Modified: maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleException.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleException.java?rev=805162&r1=805161&r2=805162&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleException.java (original)
+++ maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleException.java Mon Aug 17 21:48:52 2009
@@ -1,3 +1,5 @@
+package org.apache.maven.enforcer.rule.api;
+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -16,14 +18,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.maven.enforcer.rule.api;
-
/**
* An exception occurring during the execution of a rule. Based off of
* EnforcerRuleException, but separated to keep the rule dependencies to a
* minimum.
- *
+ *
* @author <a href="mailto:brianf@apache.org">Brian Fox</a>
* @version $Id$
*/
@@ -42,7 +42,7 @@
/**
* Gets the long message.
- *
+ *
* @return the long message
*/
public String getLongMessage()
@@ -52,7 +52,7 @@
/**
* Gets the source.
- *
+ *
* @return the source
*/
public Object getSource()
@@ -63,7 +63,7 @@
/**
* Construct a new <code>EnforcerRuleException</code> exception providing
* the source and a short and long message.
- *
+ *
* @param source the source
* @param shortMessage the short message
* @param longMessage the long message
@@ -79,7 +79,7 @@
* Construct a new <code>EnforcerRuleException</code> exception wrapping
* an underlying <code>Exception</code> and providing a
* <code>message</code>.
- *
+ *
* @param message the message
* @param cause the cause
*/
@@ -92,7 +92,7 @@
* Construct a new <code>EnforcerRuleException</code> exception wrapping
* an underlying <code>Throwable</code> and providing a
* <code>message</code>.
- *
+ *
* @param message the message
* @param cause the cause
*/
@@ -104,7 +104,7 @@
/**
* Construct a new <code>EnforcerRuleException</code> exception providing
* a <code>message</code>.
- *
+ *
* @param message the message
*/
public EnforcerRuleException( String message )
Modified: maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleHelper.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleHelper.java?rev=805162&r1=805161&r2=805162&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleHelper.java (original)
+++ maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleHelper.java Mon Aug 17 21:48:52 2009
@@ -1,3 +1,5 @@
+package org.apache.maven.enforcer.rule.api;
+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -16,7 +18,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.maven.enforcer.rule.api;
import java.util.List;
import java.util.Map;
@@ -31,7 +32,7 @@
* This is the interface that all helpers will use. This
* provides access to the log, session and components to the
* rules.
- *
+ *
* @author <a href="mailto:brianf@apache.org">Brian Fox</a>
* @version $Id$
*/
@@ -41,81 +42,81 @@
/**
* Gets the log.
- *
+ *
* @return the log
*/
- public Log getLog ();
+ Log getLog ();
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.maven.shared.enforcer.rule.api.EnforcerRuleHelper#getRuntimeInformation()
*/
/**
* Gets the component.
- *
+ *
* @param clazz the clazz
- *
+ *
* @return the component
- *
+ *
* @throws ComponentLookupException the component lookup exception
*/
- public Object getComponent ( Class clazz )
+ Object getComponent ( Class clazz )
throws ComponentLookupException;
/**
* Gets the component.
- *
+ *
* @param componentKey the component key
- *
+ *
* @return the component
- *
+ *
* @throws ComponentLookupException the component lookup exception
*/
- public Object getComponent ( String componentKey )
+ Object getComponent ( String componentKey )
throws ComponentLookupException;
/**
* Gets the component.
- *
+ *
* @param role the role
* @param roleHint the role hint
- *
+ *
* @return the component
- *
+ *
* @throws ComponentLookupException the component lookup exception
*/
- public Object getComponent ( String role, String roleHint )
+ Object getComponent ( String role, String roleHint )
throws ComponentLookupException;
/**
* Gets the component map.
- *
+ *
* @param role the role
- *
+ *
* @return the component map
- *
+ *
* @throws ComponentLookupException the component lookup exception
*/
- public Map getComponentMap ( String role )
+ Map getComponentMap ( String role )
throws ComponentLookupException;
/**
* Gets the component list.
- *
+ *
* @param role the role
- *
+ *
* @return the component list
- *
+ *
* @throws ComponentLookupException the component lookup exception
*/
- public List getComponentList ( String role )
+ List getComponentList ( String role )
throws ComponentLookupException;
/**
* Gets the container.
- *
+ *
* @return the container
*/
- public PlexusContainer getContainer();
+ PlexusContainer getContainer();
}