Ho José,

The ObjectFactory transforms raw data from the repository into nice, 
object-oriented objects. In most cases, you don't have to touch it. You don't 
have to even know what it is. The default implementation transforms the data 
according to the CMIS specification.

However, some repositories send additional data and CMIS specification allows 
that. Since the default ObjectFactory doesn't know this data it doesn't 
transform it. So, an application using DotCMIS would never see it. That's 
totally fine for generic applications.

But some applications actually want to deal with that extra data. In this case 
DotCMIS needs an IObjectFactory instance that understands this additional data.
 
A non-default IObjectFactory implementation can be supplied in two ways:

1. As a session parameter like this (see [1]):
parameters[SessionParameter.ObjectFactoryClass] = 
"some.other.ObjectFactory.classname";

2. Via the session factory with this method:
CreateSession(IDictionary<string, string> parameters, IObjectFactory 
objectFactory, AbstractAuthenticationProvider authenticationProvider, ICache 
cache)


Does this help?


- Florian


[1] http://chemistry.apache.org/dotnet/session-parameters.html



> Hi.
> 
> I can't understand some of the architecture of the library.
> 
> For example:
> 
> I can see a ObjectFactory in DotCMIS.Client.Impl namespace and a
> IObjectFactory in DotCMIS.Client but I can't see any object which returns a
> IObjectFactory instance ussing any kind of dependecy injection. Otherwise,
> ObjectFactory is not static and has a public constructor with no
> parameters. I can't see the sense of this and how to use it properly. Can
> anybody clarify this?
> 
> Thanks.
> 


Reply via email to