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 applicaiton to specifiy where the source directories are, what rules to test against and under what conditions should an Exception be thrown.

This Configuraiton may be loaded by configraiton from an XML file in the classpath, through programatic configuraiton, 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.

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.

getSources

public java.util.Collection getSources()

Getter for property sources.

Returns:
Value for property sources.

addSource

public boolean addSource(SourceDirectory sourceDirectory)

shouldThrowExceptionWhenNoPackages

public boolean shouldThrowExceptionWhenNoPackages()

Getter for property throwExceptionWhenNoPackages.

Returns:
Value for property throwExceptionWhenNoPackages.

shouldDoCyclicDependencyTest

public boolean shouldDoCyclicDependencyTest()

Getter for property doCyclicDependencyTest.

Returns:
Value for property doCyclicDependencyTest.

setThrowExceptionWhenNoPackages

public void setThrowExceptionWhenNoPackages(boolean throwExceptionWhenNoPackages)

Setter for property throwExceptionWhenNoPackages.

Parameters:
throwExceptionWhenNoPackages - Value to set for property throwExceptionWhenNoPackages.

setDoCyclicDependencyTest

public void setDoCyclicDependencyTest(boolean doCyclicDependencyTest)

Setter for property doCyclicDependencyTest.

Parameters:
doCyclicDependencyTest - Value to set for property doCyclicDependencyTest.


Copyright © 2007. All Rights Reserved.