|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IRepoGenerator
The EAI Repository generator.
This class offers services to generate or parse the most commonly used EAI Repository strings
| Method Summary | |
|---|---|
java.lang.String |
convertClassNameToRepoObject(java.lang.String pClassName)
Converts the fully qualified name of a class into AE Object name. |
java.lang.String |
convertPackageToRepoPath(java.lang.String pJavaPackage)
Converts the package name of the java class to the pre-defined EAI/Repository path. |
java.lang.String |
convertRepoPathToPackage(java.lang.String pRepoPath)
Given a TIB/Repository path, extracts the java package. |
java.lang.String |
extractSequenceName(java.lang.Class pBeanType,
java.lang.Class pCollectionType)
Generates the sequence name for a collection class. |
java.lang.String |
extractSequenceName(IBeanDescriptor pBeanProperty)
Given any bean property that is a collection, generates a unique sequence name for the EAI Repository. |
java.lang.String |
getOffset()
The relative offset to add to the Sequence/Class directory. |
int |
getPackageOffset()
The package offset used in this implementation. |
java.lang.String |
getRootClassDirectory()
The folder in which the definitions of EAI Objects are stored in the EAI/Repository. |
java.lang.String |
getRootSequenceDirectory()
The folder in which the definitions of sequences are stored in the EAI/Repository. |
void |
setOffset(java.lang.String pOffset)
Defines the relative offset to add to the Sequence/Class directory. |
void |
setPackageOffset(int pPackageOffset)
The package offset used in this implementation. |
| Method Detail |
|---|
java.lang.String extractSequenceName(IBeanDescriptor pBeanProperty)
throws RaccoonException
A sample result like:
VectorOf_raccoon_tools_generator_tibRepo_junit_TestPerson
Would mean that this collection is an instance of Vector containing N elements of type
raccoon.tools.generator.tibRepo.junit.TestPerson.
pBeanProperty - the bean property for which a sequence name is desired
"Of_" + fully qualified name where '_' replaces
'.'.
RaccoonException - if the sequence name couldn't be generated for any reason
(component not initialised for example)
java.lang.String convertPackageToRepoPath(java.lang.String pJavaPackage)
throws RaccoonException
pJavaPackage - the package name of the java class (without the class name)
RaccoonException - if the package name is an invalid java package.
java.lang.String convertClassNameToRepoObject(java.lang.String pClassName)
throws RaccoonException
This method replaces '.' with '_'.
pClassName - the name of the class, including the package
RaccoonException - if the class name is invalid.
java.lang.String getRootClassDirectory()
throws RaccoonException
RaccoonException - never thrown in this implementation.
java.lang.String getRootSequenceDirectory()
throws RaccoonException
RaccoonException - never thrown in this implementation.java.lang.String getOffset()
This values is useful when a EAI/Repository has several object definitions from various horizons. For example we have:
void setOffset(java.lang.String pOffset)
This values is useful when a EAI/Repository has several object definitions from various horizons. For example we have:
pOffset - the offset to add to all generated elements with respect to the Sequence/Class directoryint getPackageOffset()
The package offset is the number of packages to ignore when generating TIB/Repository strings. For example a class
named com.octo.theproject.beans.Person should result in
com/octo/theProject/beans/Person, however with a package offset of 2 the result will be
theproject.beans.Person.
The reason for using this value is to avoid an unnecessary amount of folders within a project.
The default is keep all packages, ie 0
void setPackageOffset(int pPackageOffset)
The package offset is the number of packages to ignore when generating TIB/Repository strings. For example a class
named com.octo.theproject.beans.Person should result in
com/octo/theProject/beans/Person, however with a package offset of 2 the result will be
theproject.beans.Person.
The reason for using this value is to avoid an unnecessary amount of folders within a project.
pPackageOffset - the package offset to be used.
java.lang.String convertRepoPathToPackage(java.lang.String pRepoPath)
throws RaccoonException
pRepoPath - the TIB/Repository path
RaccoonException - not thrown for now.
java.lang.String extractSequenceName(java.lang.Class pBeanType,
java.lang.Class pCollectionType)
throws RaccoonException
pBeanType - the collection class (ArrayList, Vector, ...)pCollectionType - the type of the elements contained within the collection
RaccoonException - if the generation fails due to an invalid class instance.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||