public class ClassloaderRuntimeRepository extends AbstractClassLoadingRuntimeRepository
ClassLoader.getResourceAsStream(String)| Modifier and Type | Field and Description |
|---|---|
static String |
REPOSITORY_XML_ELEMENT
Name of the xml element representing the product component registry.
|
static String |
TABLE_OF_CONTENTS_FILE
The default name of the file describing the registry's contents.
|
| Constructor and Description |
|---|
ClassloaderRuntimeRepository(ClassLoader cl,
String basePackage)
Creates a new repository that loads it's contents from the given classloader and the given
package.
|
ClassloaderRuntimeRepository(ClassLoader cl,
String basePackage,
String pathToToc)
Creates a new repository that loads it's contents from the given classloader and the given
package and toc resource using the default document builder.
|
ClassloaderRuntimeRepository(ClassLoader cl,
String basePackage,
String pathToToc,
ICacheFactory cacheFactory)
Creates a new repository that loads it's contents from the given classloader and the given
package using the given xml document builder.
|
| Modifier and Type | Method and Description |
|---|---|
static ClassloaderRuntimeRepository |
create(String tocResource)
Creates a new repository that loads it's contents from the given toc resource using this
class' classloader and the default xml document builder to parse the xml data.
|
static ClassloaderRuntimeRepository |
create(String tocResource,
ClassLoader cl)
Creates a new repository that loads it's contents from the given toc resource and classloader
using the default document builder to parse the xml data.
|
static ClassloaderRuntimeRepository |
create(String tocResource,
ClassLoader cl,
ICacheFactory cacheFactory)
Creates a new repository that loads it's contents from the given toc resource and classloader
using the default document builder to parse the xml data.
|
static ClassloaderRuntimeRepository |
create(String tocResource,
ICacheFactory cacheFactory)
Creates a new repository that loads it's contents from the given toc resource using this
class' classloader and the default xml document builder to parse the xml data.
|
protected DocumentBuilder |
getDocumentBuilder() |
protected <T> Element |
getDocumentElement(CustomTocEntryObject<T> tocEntry)
This method returns the xml element of the product component identified by the tocEntry
|
protected Element |
getDocumentElement(GenerationTocEntry tocEntry)
This method returns the xml element of the product component generation identified by the
tocEntry
|
protected Element |
getDocumentElement(ProductCmptTocEntry tocEntry)
This method returns the xml element of the product component identified by the tocEntry
|
protected Element |
getDocumentElement(TestCaseTocEntry tocEntry)
This method returns the xml element of the test case identified by the tocEntry
|
protected String |
getProductComponentGenerationImplClass(GenerationTocEntry tocEntry)
This method returns the name of the product component generation implementation class
identified by the tocEntry.
|
protected InputStream |
getXmlAsStream(EnumContentTocEntry tocEntry)
Returns the XML data for the specified tocEntry as
InputStream |
protected InputStream |
getXmlAsStream(TableContentTocEntry tocEntry)
Returns the XML data for the specified tocEntry as
InputStream |
boolean |
isModifiable()
Returns
true if the repository's content is modifiable. |
protected ReadonlyTableOfContents |
loadTableOfContents() |
createCustomObject, createEnumValues, createProductCmpt, createProductCmptGeneration, createProductComponentGenerationInstance, createProductComponentInstance, createTable, createTestCase, getAllProductComponentsInternal, getClassLoader, getProductVariantHelper, initClRepositoryObjectcreateEnumXmlAdapter, getAllIpsTestCases, getAllModelTypeImplementationClasses, getAllProductComponentIds, getAllProductComponents, getAllProductComponents, getAllTables, getClass, getIpsTestCaseInternal, getIpsTestCasesStartingWith, getLatestProductComponentGenerationInternal, getNextProductComponentGenerationInternal, getNotCachedCustomObject, getNotCachedEnumValues, getNotCachedEnumXmlAdapter, getNotCachedProductComponent, getNotCachedProductComponentGeneration, getNotCachedTable, getNumberOfProductComponentGenerationsInternal, getPreviousProductComponentGenerationInternal, getProductComponentGenerationInternal, getProductComponentGenerations, getProductComponentInternal, getTableInternal, getTableOfContents, initializegetAllInternalEnumXmlAdapters, getCustomRuntimeObjectInternal, getEnumValuesInternal, getProductComponentGenerationInternal, getProductComponentInternal, getTableInternal, initCachesaddDirectlyReferencedRepository, addEnumValueLookupService, getAllIpsTestCases, getAllModelTypeImplementationClasses, getAllProductComponentIds, getAllProductComponents, getAllProductComponents, getAllProductComponents, getAllReferencedRepositories, getAllTables, getCustomRuntimeObject, getDirectlyReferencedRepositories, getEnumValue, getEnumValue, getEnumValueLookupService, getEnumValues, getEnumValuesDefinedInType, getExistingProductComponent, getExistingProductComponentGeneration, getFormulaEvaluatorFactory, getIpsTest, getIpsTest, getIpsTestCase, getIpsTestCase, getIpsTestCasesStartingWith, getIpsTestSuite, getIpsTestSuite, getLatestProductComponentGeneration, getModelType, getModelType, getModelType, getName, getNextProductComponentGeneration, getNumberOfProductComponentGenerations, getPreviousProductComponentGeneration, getProductComponent, getProductComponent, getProductComponentGeneration, getProductComponentGenerations, getRuntimeRepositoryLookup, getTable, getTable, newJAXBContext, newJAXBContext, removeEnumValueLookupService, setFormulaEvaluatorFactory, setRuntimeRepositoryLookup, toStringpublic static final String REPOSITORY_XML_ELEMENT
public static final String TABLE_OF_CONTENTS_FILE
public ClassloaderRuntimeRepository(ClassLoader cl, String basePackage)
DocumentBuilderFactory.newInstance() to parse the xml files.NullPointerException - if cl or basePackage are null.IllegalArgumentException - if the basePackage does not contain the table of contents
file.RuntimeException - if the registry's table of contents file can't be read.TABLE_OF_CONTENTS_FILEpublic ClassloaderRuntimeRepository(ClassLoader cl, String basePackage, String pathToToc)
cl - The classloader to use.basePackage - The name of the base package that contains the data.pathToToc - Path from the base package to the resource containing the toc, e.g.
"faktorips-repository-toc.xml" or "motor/motor-repository-toc.xml"NullPointerException - if any argument is null.IllegalArgumentException - if the basePackage does not contain the table of contents
file.RuntimeException - if the registry's table of contents file can't be read.public ClassloaderRuntimeRepository(ClassLoader cl, String basePackage, String pathToToc, ICacheFactory cacheFactory)
cl - The classloader to use.basePackage - The name of the base package that contains the data.pathToToc - Path from the base package to the resource containing the toc, e.g.
"faktorips-repository-toc.xml" or "motor/motor-repository-toc.xml"NullPointerException - if any argument is null.IllegalArgumentException - if the basePackage does not contain the table of contents
file.RuntimeException - if the registry's table of contents file can't be read.public static final ClassloaderRuntimeRepository create(String tocResource)
tocResource - Path to the resource containing the toc file. E.g.
"org/faktorips/sample/internal/faktorips-repository-toc.xml"NullPointerException - if any argument is null.RuntimeException - if the registry's table of contents file can't be read.public static final ClassloaderRuntimeRepository create(String tocResource, ICacheFactory cacheFactory)
tocResource - Path to the resource containing the toc file. E.g.
"org/faktorips/sample/internal/faktorips-repository-toc.xml"cacheFactory - The CacheFactory used to create the cache objects in the repositoryNullPointerException - if any argument is null.RuntimeException - if the registry's table of contents file can't be read.public static final ClassloaderRuntimeRepository create(String tocResource, ClassLoader cl)
tocResource - Path to the resource containing the toc file. E.g.
"org/faktorips/sample/internal/faktorips-repository-toc.xml"cl - The classloader to use.NullPointerException - if any argument is null.RuntimeException - if the registry's table of contents file can't be read.public static final ClassloaderRuntimeRepository create(String tocResource, ClassLoader cl, ICacheFactory cacheFactory)
tocResource - Path to the resource containing the toc file. E.g.
"org/faktorips/sample/internal/faktorips-repository-toc.xml"cl - The classloader to use.cacheFactory - The CacheFactory used to create the cache objects in the repositoryNullPointerException - if any argument is null.RuntimeException - if the registry's table of contents file can't be read.protected DocumentBuilder getDocumentBuilder()
protected ReadonlyTableOfContents loadTableOfContents()
loadTableOfContents in class AbstractTocBasedRuntimeRepositoryprotected String getProductComponentGenerationImplClass(GenerationTocEntry tocEntry)
AbstractClassLoadingRuntimeRepositorygetProductComponentGenerationImplClass in class AbstractClassLoadingRuntimeRepositoryprotected Element getDocumentElement(ProductCmptTocEntry tocEntry)
AbstractClassLoadingRuntimeRepositorygetDocumentElement in class AbstractClassLoadingRuntimeRepositoryprotected Element getDocumentElement(GenerationTocEntry tocEntry)
AbstractClassLoadingRuntimeRepositorygetDocumentElement in class AbstractClassLoadingRuntimeRepositoryprotected Element getDocumentElement(TestCaseTocEntry tocEntry)
AbstractClassLoadingRuntimeRepositorygetDocumentElement in class AbstractClassLoadingRuntimeRepositoryprotected InputStream getXmlAsStream(EnumContentTocEntry tocEntry)
AbstractClassLoadingRuntimeRepositoryInputStreamgetXmlAsStream in class AbstractClassLoadingRuntimeRepositorytocEntry - Specifying the requested EnumContentpublic boolean isModifiable()
IRuntimeRepositorytrue if the repository's content is modifiable. This feature is mainly
targeted for writing test cases that need to setup a repository with a test specific content
programmatically. Returns false otherwise.protected InputStream getXmlAsStream(TableContentTocEntry tocEntry)
AbstractClassLoadingRuntimeRepositoryInputStreamgetXmlAsStream in class AbstractClassLoadingRuntimeRepositorytocEntry - Specifying the requested TableContentprotected <T> Element getDocumentElement(CustomTocEntryObject<T> tocEntry)
AbstractClassLoadingRuntimeRepositorygetDocumentElement in class AbstractClassLoadingRuntimeRepositoryCopyright © 2018. All rights reserved.