com.seventytwomiles.architecturerules.configuration
Class Configuration

java.lang.Object
  extended by com.seventytwomiles.architecturerules.configuration.Configuration
Direct Known Subclasses:
UnmodifiableConfiguration

public class Configuration
extends java.lang.Object

An instance of Configuration allows the application to specifiy where the source directories are, what rules to test against and under what conditions should an Exception be thrown.

This Configuration may be loaded by configuration from an XML file in the classpath, through programmatic configuration, or both.

Author:
mikenereson
See Also:
ConfigurationFactory, UnmodifiableConfiguration

Constructor Summary
Configuration()
           
 
Method Summary
 boolean addRule(Rule rule)
          Add a new Rule to rules
 boolean addSource(SourceDirectory sourceDirectory)
           
 java.util.Collection getRules()
          Getter for property rules.
 java.util.Collection getSources()
          Getter for property sources.
 void setDoCyclicDependencyTest(boolean doCyclicDependencyTest)
          Setter for property doCyclicDependencyTest.
 void setThrowExceptionWhenNoPackages(boolean throwExceptionWhenNoPackages)
          Setter for property throwExceptionWhenNoPackages.
 boolean shouldDoCyclicDependencyTest()
          Getter for property doCyclicDependencyTest.
 boolean shouldThrowExceptionWhenNoPackages()
           Getter for property throwExceptionWhenNoPackages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration()
Method Detail

getRules

public java.util.Collection getRules()

Getter for property rules.

Returns:
Value for property rules.

getSources

public java.util.Collection getSources()

Getter for property sources.

Returns:
Value for property sources.

setDoCyclicDependencyTest

public void setDoCyclicDependencyTest(boolean doCyclicDependencyTest)

Setter for property doCyclicDependencyTest.

Parameters:
doCyclicDependencyTest - Value to set for property doCyclicDependencyTest.

setThrowExceptionWhenNoPackages

public void setThrowExceptionWhenNoPackages(boolean throwExceptionWhenNoPackages)

Setter for property throwExceptionWhenNoPackages.

Parameters:
throwExceptionWhenNoPackages - Value to set for property throwExceptionWhenNoPackages.

addRule

public boolean addRule(Rule rule)

Add a new Rule to rules

Parameters:
rule - Rule to add
Returns:
boolean true if this set did not already contain the specified element.

addSource

public boolean addSource(SourceDirectory sourceDirectory)

shouldDoCyclicDependencyTest

public boolean shouldDoCyclicDependencyTest()

Getter for property doCyclicDependencyTest.

Returns:
Value for property doCyclicDependencyTest.

shouldThrowExceptionWhenNoPackages

public boolean shouldThrowExceptionWhenNoPackages()

Getter for property throwExceptionWhenNoPackages.

Returns:
Value for property throwExceptionWhenNoPackages.


Copyright © 2008. All Rights Reserved.