Class ReadonlyTableOfContents
java.lang.Object
org.faktorips.runtime.internal.toc.AbstractReadonlyTableOfContents
org.faktorips.runtime.internal.toc.ReadonlyTableOfContents
- All Implemented Interfaces:
IReadonlyTableOfContents
Default implementation of
ReadonlyTableOfContents.- Author:
- Jan Ortmann
-
Field Summary
Fields inherited from class org.faktorips.runtime.internal.toc.AbstractReadonlyTableOfContents
PRODUCT_DATA_VERSION_XML_ELEMENT, TOC_XML_ELEMENT -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new TOC.ReadonlyTableOfContents(ClassLoader classLoader) Creates a new TOC that uses the givenClassLoaderto findITocEntryFactoryimplementations viaServiceLoader. -
Method Summary
Modifier and TypeMethodDescription<T> CustomTocEntryObject<T>getCustomTocEntry(Class<T> type, String ipsObjectQualifiedName) Returns all toc's entries representing enum contents.getEnumContentTocEntry(String className) Returns the toc entry representing enum contents for the specified implementation class.Returns all toc entries that link to an enumeration xml adapter.Returns all toc's entries representing model types.Returns all toc's entries representing product components.getProductCmptTocEntries(String kindId) Returns all toc's entries representing product components that belong to the indicated product component kind.Returns the toc entry representing a product component for the given id or null if no entry exists for the given id.getProductCmptTocEntry(String kindId, String versionId) Returns the toc entry representing a product component for the given product component kind id and versionId or null if no such entry exists.Returns all toc's entries representing tables.getTableTocEntryByClassname(String implementationClass) Returns a toc entry representing a table for the table's class object.getTableTocEntryByQualifiedTableName(String qualifiedTableName) Returns a toc entry representing a table for this table's qualified table name.Returns all toc's entries representing test cases.getTestCaseTocEntryByQName(String qName) Returns a toc entry representing a test case for the given qualified name.<T extends IRuntimeObject>
List<CustomTocEntryObject<T>>getTypedTocEntries(Class<T> type) voidinitFromXml(Element tocElement) Initializes the table of contents with data stored in the xml element.protected voidinitHashMaps(int tocSize) protected voidinternalAddEntry(TocEntryObject entry) Adds the entry to the table of contents.protected booleanRemoves the given entry from this ToC, if this ToCis modifiable.protected booleanReturns whether this ToC is modifiable, which of course it isn't, because it is the read-only ToC, but this is different for other classes in the hierarchy.Methods inherited from class org.faktorips.runtime.internal.toc.AbstractReadonlyTableOfContents
getProductDataVersion, toString
-
Constructor Details
-
ReadonlyTableOfContents
public ReadonlyTableOfContents()Creates a new TOC. -
ReadonlyTableOfContents
Creates a new TOC that uses the givenClassLoaderto findITocEntryFactoryimplementations viaServiceLoader.- Parameters:
classLoader- theClassLoaderused to findITocEntryFactoryimplementations
-
-
Method Details
-
initFromXml
Description copied from class:AbstractReadonlyTableOfContentsInitializes the table of contents with data stored in the xml element.- Overrides:
initFromXmlin classAbstractReadonlyTableOfContents
-
initHashMaps
protected void initHashMaps(int tocSize) -
internalAddEntry
Description copied from class:AbstractReadonlyTableOfContentsAdds the entry to the table of contents.- Specified by:
internalAddEntryin classAbstractReadonlyTableOfContents
-
isModifiable
protected boolean isModifiable()Returns whether this ToC is modifiable, which of course it isn't, because it is the read-only ToC, but this is different for other classes in the hierarchy.- Since:
- 24.7
- See Also:
-
internalRemoveEntry
Removes the given entry from this ToC, if this ToCis modifiable.- Returns:
- whether the entry actually was part of this ToC
- Since:
- 24.7
-
getProductCmptTocEntries
Description copied from class:AbstractReadonlyTableOfContentsReturns all toc's entries representing product components.- Specified by:
getProductCmptTocEntriesin interfaceIReadonlyTableOfContents- Specified by:
getProductCmptTocEntriesin classAbstractReadonlyTableOfContents
-
getProductCmptTocEntry
Description copied from class:AbstractReadonlyTableOfContentsReturns the toc entry representing a product component for the given id or null if no entry exists for the given id.- Specified by:
getProductCmptTocEntryin interfaceIReadonlyTableOfContents- Specified by:
getProductCmptTocEntryin classAbstractReadonlyTableOfContents
-
getProductCmptTocEntry
Description copied from class:AbstractReadonlyTableOfContentsReturns the toc entry representing a product component for the given product component kind id and versionId or null if no such entry exists.- Specified by:
getProductCmptTocEntryin interfaceIReadonlyTableOfContents- Specified by:
getProductCmptTocEntryin classAbstractReadonlyTableOfContents
-
getProductCmptTocEntries
Description copied from class:AbstractReadonlyTableOfContentsReturns all toc's entries representing product components that belong to the indicated product component kind.- Specified by:
getProductCmptTocEntriesin interfaceIReadonlyTableOfContents- Specified by:
getProductCmptTocEntriesin classAbstractReadonlyTableOfContents
-
getTableTocEntries
Description copied from class:AbstractReadonlyTableOfContentsReturns all toc's entries representing tables.- Specified by:
getTableTocEntriesin interfaceIReadonlyTableOfContents- Specified by:
getTableTocEntriesin classAbstractReadonlyTableOfContents
-
getTableTocEntryByClassname
Description copied from class:AbstractReadonlyTableOfContentsReturns a toc entry representing a table for the table's class object.- Specified by:
getTableTocEntryByClassnamein interfaceIReadonlyTableOfContents- Specified by:
getTableTocEntryByClassnamein classAbstractReadonlyTableOfContents
-
getTableTocEntryByQualifiedTableName
Description copied from class:AbstractReadonlyTableOfContentsReturns a toc entry representing a table for this table's qualified table name.- Specified by:
getTableTocEntryByQualifiedTableNamein interfaceIReadonlyTableOfContents- Specified by:
getTableTocEntryByQualifiedTableNamein classAbstractReadonlyTableOfContents
-
getTestCaseTocEntries
Description copied from class:AbstractReadonlyTableOfContentsReturns all toc's entries representing test cases.- Specified by:
getTestCaseTocEntriesin interfaceIReadonlyTableOfContents- Specified by:
getTestCaseTocEntriesin classAbstractReadonlyTableOfContents
-
getTestCaseTocEntryByQName
Description copied from class:AbstractReadonlyTableOfContentsReturns a toc entry representing a test case for the given qualified name.- Specified by:
getTestCaseTocEntryByQNamein interfaceIReadonlyTableOfContents- Specified by:
getTestCaseTocEntryByQNamein classAbstractReadonlyTableOfContents
-
getModelTypeTocEntries
Description copied from class:AbstractReadonlyTableOfContentsReturns all toc's entries representing model types.- Specified by:
getModelTypeTocEntriesin interfaceIReadonlyTableOfContents- Specified by:
getModelTypeTocEntriesin classAbstractReadonlyTableOfContents
-
getEnumContentTocEntries
Description copied from interface:IReadonlyTableOfContentsReturns all toc's entries representing enum contents. -
getEnumContentTocEntry
Description copied from class:AbstractReadonlyTableOfContentsReturns the toc entry representing enum contents for the specified implementation class.- Specified by:
getEnumContentTocEntryin interfaceIReadonlyTableOfContents- Specified by:
getEnumContentTocEntryin classAbstractReadonlyTableOfContents
-
getEnumXmlAdapterTocEntries
Description copied from class:AbstractReadonlyTableOfContentsReturns all toc entries that link to an enumeration xml adapter.- Specified by:
getEnumXmlAdapterTocEntriesin interfaceIReadonlyTableOfContents- Specified by:
getEnumXmlAdapterTocEntriesin classAbstractReadonlyTableOfContents
-
getEntries
-
getCustomTocEntry
-
getTypedTocEntries
- Specified by:
getTypedTocEntriesin classAbstractReadonlyTableOfContents
-