com.atlassian.jira.scheme.distiller
Class SchemeDistillerImpl

java.lang.Object
  extended by com.atlassian.jira.scheme.distiller.SchemeDistillerImpl
All Implemented Interfaces:
SchemeDistiller

public class SchemeDistillerImpl
extends Object
implements SchemeDistiller

Implements SchemeDistiller.


Constructor Summary
SchemeDistillerImpl(SchemeManagerFactory schemeManagerFactory, SchemePermissions schemePermissions, EventTypeManager eventTypeManager)
           
 
Method Summary
 DistilledSchemeResults distillSchemes(Collection schemes)
          This method does the work of analyzing and distilling, if possible, the passed in Scheme's.
 SchemeRelationships getSchemeRelationships(DistilledSchemeResults distilledSchemeResults)
          This method will return a SchemeRelationships object for the internal collections of distilled scheme results.
 Scheme persistNewSchemeMappings(DistilledSchemeResult distilledSchemeResult)
          This method will persist the result of the 'distilling' operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemeDistillerImpl

public SchemeDistillerImpl(SchemeManagerFactory schemeManagerFactory,
                           SchemePermissions schemePermissions,
                           EventTypeManager eventTypeManager)
Method Detail

persistNewSchemeMappings

public Scheme persistNewSchemeMappings(DistilledSchemeResult distilledSchemeResult)
                                throws DataAccessException
Description copied from interface: SchemeDistiller
This method will persist the result of the 'distilling' operation. The newly created scheme will be saved to persistent store and the project associations will be updated to point to the new scheme.

Specified by:
persistNewSchemeMappings in interface SchemeDistiller
Returns:
the new Scheme that was created and assoicated. This will return a null scheme if the DistilledSchemeResult.getType() is not of a Notification or Permission type.
Throws:
DataAccessException - if something goes wrong at the db level.

getSchemeRelationships

public SchemeRelationships getSchemeRelationships(DistilledSchemeResults distilledSchemeResults)
Description copied from interface: SchemeDistiller
This method will return a SchemeRelationships object for the internal collections of distilled scheme results. These will show if each scheme entity type matches each other, or not at all.

Specified by:
getSchemeRelationships in interface SchemeDistiller
Returns:
a collection of SchemeRelationships objects.

distillSchemes

public DistilledSchemeResults distillSchemes(Collection schemes)
Description copied from interface: SchemeDistiller
This method does the work of analyzing and distilling, if possible, the passed in Scheme's.

Specified by:
distillSchemes in interface SchemeDistiller
Parameters:
schemes - a collection of Scheme objects representing the schemes that you would like to try to 'distill'.
Returns:
a DistilledSchemeResults object which represent the result of the 'distilling' operation. There will be one DistilledSchemeResults for each successfully distilled set of schemes. You can access the 'undistilled' schemes via the object See the javadoc for DistilledSchemeResults for full details. The object will contain empty collections if null or an empty collection is passed in.


Copyright © 2002-2012 Atlassian. All Rights Reserved.