org.faktorips.runtime.internal.toc
Class ReadonlyTableOfContents

java.lang.Object
  extended by org.faktorips.runtime.internal.toc.AbstractReadonlyTableOfContents
      extended by org.faktorips.runtime.internal.toc.ReadonlyTableOfContents
All Implemented Interfaces:
IReadonlyTableOfContents

public class ReadonlyTableOfContents
extends AbstractReadonlyTableOfContents

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
ReadonlyTableOfContents()
          Creates a new TOC.
ReadonlyTableOfContents(ClassLoader classLoader)
          Creates a new TOC that uses the given ClassLoader to find ITocEntryFactory implementations via ServiceLoader.
 
Method Summary
<T> CustomTocEntryObject<T>
getCustomTocEntry(Class<T> type, String ipsObjectQualifiedName)
           
 List<TocEntryObject> getEntries()
           
 List<EnumContentTocEntry> getEnumContentTocEntries()
          Returns all toc's entries representing enum contents.
 EnumContentTocEntry getEnumContentTocEntry(String className)
          Returns the toc entry representing enum contents for the specified implementation class.
 Set<EnumXmlAdapterTocEntry> getEnumXmlAdapterTocEntries()
          Returns all toc entries that link to an enumeration xml adapter.
 Set<ModelTypeTocEntry> getModelTypeTocEntries()
          Returns all toc's entries representing model types.
 List<ProductCmptTocEntry> getProductCmptTocEntries()
          Returns all toc's entries representing product components.
 List<ProductCmptTocEntry> getProductCmptTocEntries(String kindId)
          Returns all toc's entries representing product components that belong to the indicated product component kind.
 ProductCmptTocEntry getProductCmptTocEntry(String id)
          Returns the toc entry representing a product component for the given id or null if no entry exists for the given id.
 ProductCmptTocEntry 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.
 List<TableContentTocEntry> getTableTocEntries()
          Returns all toc's entries representing tables.
 TableContentTocEntry getTableTocEntryByClassname(String implementationClass)
          Returns a toc entry representing a table for the table's class object.
 TableContentTocEntry getTableTocEntryByQualifiedTableName(String qualifiedTableName)
          Returns a toc entry representing a table for this table's qualified table name.
 List<TestCaseTocEntry> getTestCaseTocEntries()
          Returns all toc's entries representing test cases.
 TestCaseTocEntry 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)
           
 void initFromXml(Element tocElement)
          Initializes the table of contents with data stored in the xml element.
protected  void initHashMaps(int tocSize)
           
protected  void internalAddEntry(TocEntryObject entry)
          Adds the entry to the table of contents.
 
Methods inherited from class org.faktorips.runtime.internal.toc.AbstractReadonlyTableOfContents
getProductDataVersion, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReadonlyTableOfContents

public ReadonlyTableOfContents()
Creates a new TOC.


ReadonlyTableOfContents

public ReadonlyTableOfContents(ClassLoader classLoader)
Creates a new TOC that uses the given ClassLoader to find ITocEntryFactory implementations via ServiceLoader.

Parameters:
classLoader - the ClassLoader used to find ITocEntryFactory implementations
Method Detail

initFromXml

public void initFromXml(Element tocElement)
Description copied from class: AbstractReadonlyTableOfContents
Initializes the table of contents with data stored in the xml element.

Overrides:
initFromXml in class AbstractReadonlyTableOfContents

initHashMaps

protected void initHashMaps(int tocSize)

internalAddEntry

protected void internalAddEntry(TocEntryObject entry)
Description copied from class: AbstractReadonlyTableOfContents
Adds the entry to the table of contents.

Specified by:
internalAddEntry in class AbstractReadonlyTableOfContents

getProductCmptTocEntries

public List<ProductCmptTocEntry> getProductCmptTocEntries()
Description copied from class: AbstractReadonlyTableOfContents
Returns all toc's entries representing product components.

Specified by:
getProductCmptTocEntries in interface IReadonlyTableOfContents
Specified by:
getProductCmptTocEntries in class AbstractReadonlyTableOfContents

getProductCmptTocEntry

public ProductCmptTocEntry getProductCmptTocEntry(String id)
Description copied from class: AbstractReadonlyTableOfContents
Returns the toc entry representing a product component for the given id or null if no entry exists for the given id.

Specified by:
getProductCmptTocEntry in interface IReadonlyTableOfContents
Specified by:
getProductCmptTocEntry in class AbstractReadonlyTableOfContents

getProductCmptTocEntry

public ProductCmptTocEntry getProductCmptTocEntry(String kindId,
                                                  String versionId)
Description copied from class: AbstractReadonlyTableOfContents
Returns 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:
getProductCmptTocEntry in interface IReadonlyTableOfContents
Specified by:
getProductCmptTocEntry in class AbstractReadonlyTableOfContents

getProductCmptTocEntries

public List<ProductCmptTocEntry> getProductCmptTocEntries(String kindId)
Description copied from class: AbstractReadonlyTableOfContents
Returns all toc's entries representing product components that belong to the indicated product component kind.

Specified by:
getProductCmptTocEntries in interface IReadonlyTableOfContents
Specified by:
getProductCmptTocEntries in class AbstractReadonlyTableOfContents

getTableTocEntries

public List<TableContentTocEntry> getTableTocEntries()
Description copied from class: AbstractReadonlyTableOfContents
Returns all toc's entries representing tables.

Specified by:
getTableTocEntries in interface IReadonlyTableOfContents
Specified by:
getTableTocEntries in class AbstractReadonlyTableOfContents

getTableTocEntryByClassname

public TableContentTocEntry getTableTocEntryByClassname(String implementationClass)
Description copied from class: AbstractReadonlyTableOfContents
Returns a toc entry representing a table for the table's class object.

Specified by:
getTableTocEntryByClassname in interface IReadonlyTableOfContents
Specified by:
getTableTocEntryByClassname in class AbstractReadonlyTableOfContents

getTableTocEntryByQualifiedTableName

public TableContentTocEntry getTableTocEntryByQualifiedTableName(String qualifiedTableName)
Description copied from class: AbstractReadonlyTableOfContents
Returns a toc entry representing a table for this table's qualified table name.

Specified by:
getTableTocEntryByQualifiedTableName in interface IReadonlyTableOfContents
Specified by:
getTableTocEntryByQualifiedTableName in class AbstractReadonlyTableOfContents

getTestCaseTocEntries

public List<TestCaseTocEntry> getTestCaseTocEntries()
Description copied from class: AbstractReadonlyTableOfContents
Returns all toc's entries representing test cases.

Specified by:
getTestCaseTocEntries in interface IReadonlyTableOfContents
Specified by:
getTestCaseTocEntries in class AbstractReadonlyTableOfContents

getTestCaseTocEntryByQName

public TestCaseTocEntry getTestCaseTocEntryByQName(String qName)
Description copied from class: AbstractReadonlyTableOfContents
Returns a toc entry representing a test case for the given qualified name.

Specified by:
getTestCaseTocEntryByQName in interface IReadonlyTableOfContents
Specified by:
getTestCaseTocEntryByQName in class AbstractReadonlyTableOfContents

getModelTypeTocEntries

public Set<ModelTypeTocEntry> getModelTypeTocEntries()
Description copied from class: AbstractReadonlyTableOfContents
Returns all toc's entries representing model types.

Specified by:
getModelTypeTocEntries in interface IReadonlyTableOfContents
Specified by:
getModelTypeTocEntries in class AbstractReadonlyTableOfContents

getEnumContentTocEntries

public List<EnumContentTocEntry> getEnumContentTocEntries()
Description copied from interface: IReadonlyTableOfContents
Returns all toc's entries representing enum contents.


getEnumContentTocEntry

public EnumContentTocEntry getEnumContentTocEntry(String className)
Description copied from class: AbstractReadonlyTableOfContents
Returns the toc entry representing enum contents for the specified implementation class.

Specified by:
getEnumContentTocEntry in interface IReadonlyTableOfContents
Specified by:
getEnumContentTocEntry in class AbstractReadonlyTableOfContents

getEnumXmlAdapterTocEntries

public Set<EnumXmlAdapterTocEntry> getEnumXmlAdapterTocEntries()
Description copied from class: AbstractReadonlyTableOfContents
Returns all toc entries that link to an enumeration xml adapter.

Specified by:
getEnumXmlAdapterTocEntries in interface IReadonlyTableOfContents
Specified by:
getEnumXmlAdapterTocEntries in class AbstractReadonlyTableOfContents

getEntries

public List<TocEntryObject> getEntries()

getCustomTocEntry

public <T> CustomTocEntryObject<T> getCustomTocEntry(Class<T> type,
                                                     String ipsObjectQualifiedName)

getTypedTocEntries

public <T extends IRuntimeObject> List<CustomTocEntryObject<T>> getTypedTocEntries(Class<T> type)
Specified by:
getTypedTocEntries in class AbstractReadonlyTableOfContents


Copyright © 2015. All rights reserved.