Commit 48fbcd0f authored by Simon Barner's avatar Simon Barner
Browse files

Enable quering allocation table types for entries + source/target view

Issue-Ref: 3735
Issue-Url: https://af3-developer.fortiss.org/issues/3735

Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent a0d6404e
AF3AllocationActivator.java fa98bbdbd34d9d3c76f7f2827f2f456105c90fa6 GREEN
IAllocationService.java 3a1ad21ee49e014e5ce82537686308eab6dc1fe3 YELLOW
IAllocationService.java d937da9be337e0fe063c18faa9a598b6c0ee5d00 YELLOW
......@@ -99,6 +99,27 @@ public interface IAllocationService {
getAllocationEntryTypes(Class<? extends AllocationTable> allocationTableType,
@SuppressWarnings("unchecked") Class<? extends A>... allocationTypes);
/**
* Returns the {@link AllocationTable} types that have been registered to contain
* {@link AllocationEntry}s of the given {@code entryType}.
*/
public Collection<Class<? extends AllocationTable>>
getAllocationTableTypesForEntryType(Class<? extends AllocationEntry> entryType);
/**
* Returns the {@link AllocationTable} types that have been registered to reference
* {@link IProjectRootElement}s of the given {@code sourceViewType} as source view.
*/
public Collection<Class<? extends AllocationTable>> getAllocationTableTypesForSourceView(
Class<? extends IProjectRootElement> sourceViewType);
/**
* Returns the {@link AllocationTable} types that have been registered to reference
* {@link IProjectRootElement}s of the given {@code targetViewType} as target view.
*/
public Collection<Class<? extends AllocationTable>> getAllocationTableTypesForTargetView(
Class<? extends IProjectRootElement> targetViewType);
/**
* Registers an additional source model entity type with the given {@link AllocationEntry}
* specialization (see {@link #addAllocationEntryType(Class, Class, Class, Class, Class)}).
......
AllocationService.java dd5172144e4ce2b575debadc9ae0991a254e373d YELLOW
AllocationService.java 5ed08b5841d625a7e5f2da2eb559d21aa6913ceb YELLOW
......@@ -194,6 +194,30 @@ public final class AllocationService implements IAllocationService, IIntrospecti
return filterTypes(entries, allocationTypes);
}
/** {@inheritDoc} */
@Override
public Collection<Class<? extends AllocationTable>>
getAllocationTableTypesForEntryType(Class<? extends AllocationEntry> entryType) {
return allocationTableEntryTypeMap.getSourceTypes(entryType);
}
/** {@inheritDoc} */
@Override
public Collection<Class<? extends AllocationTable>>
getAllocationTableTypesForSourceView(Class<? extends IProjectRootElement> sourceViewType) {
return sourceModelTypeMap.getSourceTypes(sourceViewType);
}
/** {@inheritDoc} */
@Override
public Collection<Class<? extends AllocationTable>>
getAllocationTableTypesForTargetView(Class<? extends IProjectRootElement> targetViewType) {
return targetModelTypeMap.getSourceTypes(targetViewType);
}
/** {@inheritDoc} */
@Override
public void addSourceEntityType(Class<? extends AllocationEntry> allocationEntryType,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment