Class AbstractRefactoring
- java.lang.Object
-
- org.contextmapper.dsl.refactoring.AbstractRefactoring
-
- All Implemented Interfaces:
Refactoring
- Direct Known Subclasses:
AbstractExtractSymmetricRelationshipRefactoring
,AbstractHenshinRefactoring
,AbstractToggleSymmetricRelationshipRefactoring
,ChangePartnershipToUpstreamDownstreamRefactoring
,ExtractAggregatesByCohesion
,ExtractAggregatesByVolatility
,MergeAggregatesRefactoring
,MergeBoundedContextsRefactoring
,SplitBoundedContextByAggregateAttribute
public abstract class AbstractRefactoring extends java.lang.Object implements Refactoring
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<CMLResourceContainer>
additionalResourcesToCheck
protected org.eclipse.emf.ecore.resource.ResourceSet
consistencyCheckResources
protected java.util.Set<CMLResourceContainer>
importedResources
protected ContextMappingModel
model
protected CMLResourceContainer
rootResource
-
Constructor Summary
Constructors Constructor Description AbstractRefactoring()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected <T> void
addElementsToEList(org.eclipse.emf.common.util.EList<T> list, java.util.List<T> elementsToAdd)
protected <T> void
addElementToEList(org.eclipse.emf.common.util.EList<T> list, T elementToAdd)
protected abstract void
doRefactor()
void
doRefactor(CMLResourceContainer resource)
Applies the refactoring to the CML model in the given resource.void
doRefactor(CMLResourceContainer resource, org.eclipse.emf.ecore.resource.ResourceSet consistencyCheckResources)
Applies the refactoring to the CML model in the given resource.protected java.util.Set<BoundedContext>
getAllBoundedContexts()
protected java.util.Set<ContextMap>
getAllContextMaps()
protected CMLResourceContainer
getResource(BoundedContext bc)
protected CMLResourceContainer
getResource(ContextMap contextMap)
protected void
markResourceChanged(CMLResourceContainer resource)
protected void
markResourceChanged(BoundedContext changedBoundedContext)
protected void
markResourceChanged(ContextMap changedContextMap)
protected <T> void
removeElementFromEList(org.eclipse.emf.common.util.EList<T> list, T object)
protected void
saveResource(org.eclipse.emf.ecore.resource.Resource resource)
protected void
saveResources()
-
-
-
Field Detail
-
model
protected ContextMappingModel model
-
rootResource
protected CMLResourceContainer rootResource
-
importedResources
protected java.util.Set<CMLResourceContainer> importedResources
-
consistencyCheckResources
protected org.eclipse.emf.ecore.resource.ResourceSet consistencyCheckResources
-
additionalResourcesToCheck
protected java.util.Set<CMLResourceContainer> additionalResourcesToCheck
-
-
Method Detail
-
doRefactor
public void doRefactor(CMLResourceContainer resource)
Description copied from interface:Refactoring
Applies the refactoring to the CML model in the given resource.- Specified by:
doRefactor
in interfaceRefactoring
- Parameters:
resource
- the resource with the CML model that shall be refactored
-
doRefactor
public void doRefactor(CMLResourceContainer resource, org.eclipse.emf.ecore.resource.ResourceSet consistencyCheckResources)
Description copied from interface:Refactoring
Applies the refactoring to the CML model in the given resource. Additionally ensures consistency in Context Maps in all resources of the additional ResourceSet.- Specified by:
doRefactor
in interfaceRefactoring
- Parameters:
resource
- the resource with the CML model that shall be refactored.consistencyCheckResources
- the resources that contain Context Maps which potentially have to be corrected after refactoring
-
doRefactor
protected abstract void doRefactor()
-
getAllBoundedContexts
protected java.util.Set<BoundedContext> getAllBoundedContexts()
-
getAllContextMaps
protected java.util.Set<ContextMap> getAllContextMaps()
-
saveResource
protected void saveResource(org.eclipse.emf.ecore.resource.Resource resource)
-
saveResources
protected void saveResources()
-
markResourceChanged
protected void markResourceChanged(BoundedContext changedBoundedContext)
-
markResourceChanged
protected void markResourceChanged(ContextMap changedContextMap)
-
markResourceChanged
protected void markResourceChanged(CMLResourceContainer resource)
-
getResource
protected CMLResourceContainer getResource(BoundedContext bc)
-
getResource
protected CMLResourceContainer getResource(ContextMap contextMap)
-
addElementsToEList
protected <T> void addElementsToEList(org.eclipse.emf.common.util.EList<T> list, java.util.List<T> elementsToAdd)
-
addElementToEList
protected <T> void addElementToEList(org.eclipse.emf.common.util.EList<T> list, T elementToAdd)
-
removeElementFromEList
protected <T> void removeElementFromEList(org.eclipse.emf.common.util.EList<T> list, T object)
-
-