Re: MidgardConfigFile

Piotras <pp-VVDi8QVAvoBWk0Htik3J/[email protected]>
Newsgroups gmane.comp.web.midgard.devel
Message-ID <[email protected]>
Jukka Zitting <[email protected]> wrote:

> Hi,

Hi,
 
> > For ad-hoc remote database or *pure* desktop application both solutions (mine and
> > yours are bad ).  In such case , configuration should be handled quite different way
> > and probably explicit object's setters should be added.
> 
> That's all I ask. Specify a way to do this and I'll be perfectly happy. :-)

OK, I will add object's setters soon , so one thing left should be document object properties.

> Think about how to implement backwards compatibility with the
> MidgardDatabase etc. directives with the new GObject configuration
> mechanism. When you've solved that, you'll probably also have a
> solution for the above use case.

1.9 is going to be the fourth release when vhosts are created with dg.
It means that in many cases , you even do not touch vhost configuration file.
So, we will just drop it in favour of MidgardConfigFile.
If not , we should use both dcfg->config and other members for some time.
 
> > I was rather asking about problems with update, create , get_by_xxx methods.
> 
> These are all things that I'm currently unable to use because of the
> unsolved higher-level issues. For example all the create, update, and
> delete methods are totally useless to me until there is a clear
> definition of how they are really supposed to work with MultiLang
> content. (And don't answer this with a simple example, I need a clear
> document that answers the conceptual issues I raised in the recent
> MultiLang thread.)

Yep. This requires some mgd struct management. 
Lang member in midgard struct is an integer which points to current lang.
All object "methods" require mgd struct as parameter. 

So we have two choices:
 
1. ( for you only ) 
	Make midgard-java class which is a wrapper for mgd struct. With some set(get)_lang method.
	Add class methods.

2. ( mandatory ) 
	Remove midgard struct in favour of MidgardConfig and MidgardConnection objects.
 
Multilang reflection is impossible right now. Of course for object's properties.

Piotras
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.