Package org.eclnt.ccaddons.dof.util
Class DOFRepository
java.lang.Object
org.eclnt.ccaddons.dof.util.DOFRepository
Repository keeps the meta data. In case of the user changing the meta
data it also saves the meta data.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addObjectType
(String xml) Adds object type into repository.void
addObjectType
(DOFObjectType objectType) Adds object type into repository.static DOFRepository
static DOFRepository
instance()
Accessing the instance.Get XML representation of object type.readObject
(String id, Class clazz) readObjectType
(String id, boolean withError) Reads object type from repository.
The reading is done in the following steps:
1. if the object type was passed withaddObjectType(DOFObjectType)
before then this instance is passed.
2. the classloader is checked for an XML file of the object type, which is an JAXB representation ofDOFObjectType
.void
Saves the object type in the stream store.
-
Method Details
-
instance
Accessing the instance. -
designTimeInstance
-
readObjectType
Reads object type from repository.
The reading is done in the following steps:
1. if the object type was passed withaddObjectType(DOFObjectType)
before then this instance is passed.
2. the classloader is checked for an XML file of the object type, which is an JAXB representation ofDOFObjectType
. The name of this resource file is built in the following way: if the id is "abc.def.Person" then the resource file is "abc/def/DOFObjectType.Person.xml".
3. the streamstore is checked for an XML representation. The file path is built in the following way: if the id is "abc.def.Person" then the file path ist "ccdof/abc/def/DOFObjectType.Person.xml". - The streamstore by default saves/read its info within the servlet-temp directory, which is e.g. with Tomcat "tomcat/work/Catalina/localhost/...webappName.../streamstore. Read details about the stream store within the CaptainCasa Developer's Guide.- Parameters:
withError
- If true is passed then an error is thrown e.g. if the object type is not available. If false is passed then null is returned in case of error.
-
addObjectType
Adds object type into repository. -
addObjectType
Adds object type into repository. The XML is a JAXB representation of the DOFObjectType. -
saveObjectType
Saves the object type in the stream store. -
marshalObjectType
Get XML representation of object type. -
readObject
-