You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Angelo Matarazzo <ma...@gmail.com> on 2009/01/22 20:00:52 UTC

Content Service

Hi, 
I am following the debate between Hans and David about Content Component.
I am looking at a way to upload a resource and integrate it in database.
In Content Component there is a java service: persistContentAndAssoc  which
is called very often.
Instead in Party Component it seems that this service is  replaced by
uploadPartyContentFile which don't call "persistContentAndAssoc" but other
services.
Why?
To upload a file it is better to follow  Party Component?
"persistContentAndAssoc" is been replaced in the system?
Thank you.




-- 
View this message in context: http://www.nabble.com/Content-Service-tp21610839p21610839.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Content Service

Posted by Jacques Le Roux <ja...@les7arts.com>.
I mostly agree with Bruno here (Frankenstein, brrrr... :o)
BTW, I think Opentpas took roughly this way...

Jacques

From: "Bruno Busco" <br...@gmail.com>
> Vince,
> I generally agree with you that usually it is better to not re-invent the
> wheel and use as much as possible what other do and offer.
> On the other hand, using our own tools and base bricks to implement what we
> need is something that has some advantage too.
> 
> Integrating a complex component like the one that you propose, I guess, has
> not a so limited drawback as integrating a captcha library or a pdf
> renderer.
> The Content Manager has its own persistence system that we already have and
> all OFBiz relyies on.
> Also the Portal system has been (quite) easily developed leveraging on the
> base tools OFBiz offers.
> 
> This kind of approach (the home grown) is usefull becouse we have time to
> better understand what are our true needs and we use (and improve) the OFBiz
> framework to reach them.
> 
> On a side path, a search for more "standard" alternative is, of course,
> beneficial but we should evaluate if the standard package integration takes
> us toward a simpler and more powerfull OFBiz or toward a Frankestein system.
> 
> In conclusion I think that considering an external package integration
> always needs a deep knowledge of its implementation or at least of its
> interface to the rest of the framework. This also needs time. Do we have
> this time?
> 
> My two cents.
> -Bruno
> 
> 
> 2009/1/25 Vince M. Clark <vc...@globalera.com>
> 
>> I posed the question yesterday about integrating with Lenya. I've done more
>> research since then and realized that apparently Lenya does not yet
>> implement any standards such as JCR, which was really the point of my
>> question.
>>
>> So I want to raise a larger issue. It is my opinion that certain things
>> should not be built from scratch within OfBiz. CMS is one of them, Portal
>> was another. When the portal topic came up I made a similar suggestion that
>> we consider integration with other portal technologies rather than building
>> our own. Standards exist for portals as well.
>>
>> So my research led me to Jackrabbit. Another Apache project that implements
>> JCR 1.0.
>> http://jackrabbit.apache.org/
>>
>> It seems to be just an API, so OfBiz security, persistence, UI, etc. would
>> still apply. Taking this approach would make integration easier for people
>> using other CMS's, right?
>>
>> Looking forward to your responses...
>>
>> ----- Original Message -----
>> From: "BJ Freeman" <bj...@free-man.net>
>> To: user@ofbiz.apache.org
>> Sent: Saturday, January 24, 2009 3:07:16 AM (GMT-0700) America/Denver
>> Subject: Re: Content Service
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Actually the SEAS of ofbiz allows you the flexibility of doing what you
>> describe in Drupal.
>> You have security for Services and UI, so I don't see what Drupal has in
>> that regard that is any better.
>>
>> Sounds like you comparing ofbiz and drupal from a Database perspective
>> instead of a functional level.
>>
>> Milind Parikh sent the following on 1/23/2009 9:30 PM:
>> > First of all, I agree that anyone attempting to rewrite the content
>> > management system within OfBiz should look the current implementation. It
>> is
>> > pretty robust and maintains a lot of data and the meta data required to
>> > manage the content. For example, it has the concept of revision built in.
>> >
>> > However, competing with Drupal can be tough and hard; in the CMS space.
>> > Since Drupal has the unusual structure of workflow in calling different
>> > functions in a module at predetermined points, modules can themselves add
>> > different tables, change display and change basic functions in a drastic
>> > way; but very simply. For example, a module can prevent access to
>> specific
>> > fields in specific content; depending upon the role of the person logging
>> > in. Certainly drupal development has reached a very furious pace; because
>> of
>> > the manner in which individuals can contribute through modules.
>> >
>> > Having said that, there is no substitute for the rigor of standardized
>> > database structures; especially in the business world. Following best
>> > practices in data modeling is key for success to any complex
>> implementation.
>> > Also having standardized APIs that enable integration to the rest of the
>> > world is very important as well.
>> >
>> > Just my two cents...
>> >
>> > On Fri, Jan 23, 2009 at 8:28 PM, David E Jones
>> > <da...@hotwaxmedia.com>wrote:
>> >
>> >> Not that I think we should do that, but why would it be hard? It's just
>> >> tables in a database, screens that read from and write to the data...
>> >>
>> >> On the other hand, if anyone wants to research that I'd recommend
>> >> researching the OFBiz stuff first so you can understand what it is like
>> and
>> >> what it supports. No sense replacing something that already takes care
>> of
>> >> your needs, even if you didn't know it.
>> >>
>> >> -David
>> >>
>> >>
>> >>
>> >> On Jan 23, 2009, at 5:49 PM, BJ Freeman wrote:
>> >>
>> >> -----BEGIN PGP SIGNED MESSAGE-----
>> >>> Hash: SHA1
>> >>>
>> >>> Yup. The hard part is to work with in the confines of ofbiz framework.
>> >>> takes a lot of time to chart the flow of drupal then apply it to ofbiz.
>> >>>
>> >>> Milind Parikh sent the following on 1/23/2009 4:05 PM:
>> >>>
>> >>>> I did not mean integration with an PHP based application. Just the
>> design
>> >>>> philosophy of the data structures and the concept of modules in drupal
>> >>>> (of
>> >>>> course, this is easier in a dynamically typed language like php).
>> >>>>
>> >>>> Regards
>> >>>> - Milind
>> >>>>
>> >>>>
>> >>>> On Fri, Jan 23, 2009 at 3:45 PM, BJ Freeman <bj...@free-man.net>
>> wrote:
>> >>>>
>> >>>> the problem with integration of a PHP based application is it is a
>> >>>> completely separate application and coding style.
>> >>>>
>> >>>> Milind Parikh sent the following on 1/22/2009 12:34 PM:
>> >>>>
>> >>>>> There is a lot of interest in CMS. I would suggest also looking at
>> >>>>>> Drupal's
>> >>>>> way of doing CMS (drupal,org) as I believe that it is very
>> interesting
>> >>>>>> and
>> >>>>> flexible. However it is more suited to the web (as opposed to
>> enterprise
>> >>>>>>> content management).
>> >>>>>>>
>> >>>>>>> -- Milind
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> On Thu, Jan 22, 2009 at 12:27 PM, Bruno Busco <
>> bruno.busco@gmail.com>
>> >>>>>>>
>> >>>>>> wrote:
>> >>>>> Hi Al,
>> >>>>>>>> I do not want to hijack the thread but I think there is more
>> interest
>> >>>>>>>> in
>> >>>>>>>> CMS
>> >>>>>>>> than you could believe.
>> >>>>>>>>
>> >>>>>>>> There were also discussions on using OFBiz CMS to host the OFBiz
>> Web
>> >>>>>>>>
>> >>>>>>> site
>> >>>>> itself.
>> >>>>>>>> This would be great and, may be, now that it seems you are back
>> >>>>>>>> on-line,
>> >>>>>>>>
>> >>>>>>> we
>> >>>>> could have better chance.
>> >>>>>>>> Thank you,
>> >>>>>>>> Bruno
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>> 2009/1/22 Al Byers <by...@automationgroups.com>
>> >>>>>>>>
>> >>>>>>>> Angelo,
>> >>>>>>>>> I implemented the CMS years ago per David's design. At the time,
>> I
>> >>>>>>>>>
>> >>>>>>>> thought
>> >>>>>>>>
>> >>>>>>>>> it would be wise to have a single service,
>> persistContentAndAssoc,
>> >>>>>>>>>
>> >>>>>>>> which
>> >>>>> did
>> >>>>>>>>> everything - creating and updating, all types of media and all
>> >>>>>>>>> possible
>> >>>>>>>>> repositories (ie. database, filesystem, etc). I am not convinced
>> >>>>>>>>> that
>> >>>>>>>>>
>> >>>>>>>> it
>> >>>>> would not be nice to have such a tool, even though it tends to go
>> >>>>>>>> against
>> >>>>> the "OFBiz way" (I claim that for a T-shirt). I don't think
>> >>>>>>>>> persistContentAndAssoc is that tool, though I would love someone
>> to
>> >>>>>>>>>
>> >>>>>>>> improve
>> >>>>>>>>
>> >>>>>>>>> on it or simplify it.
>> >>>>>>>>>
>> >>>>>>>>> Not having a clear API for working with the CMS is its greatest
>> >>>>>>>>>
>> >>>>>>>> drawback,
>> >>>>> I
>> >>>>>>>>> think. Saner heads than mine have broken the persist process into
>> >>>>>>>>>
>> >>>>>>>> multiple
>> >>>>>>>>
>> >>>>>>>>> steps. I drew from what they have done and here is how I recently
>> >>>>>>>>> did a
>> >>>>>>>>> simple text persist:
>> >>>>>>>>> ...
>> >>>>>>>>> String localeString = (String)entry.getKey();
>> >>>>>>>>> String textData = (String)entry.getValue();
>> >>>>>>>>> // Create new content
>> >>>>>>>>> mapIn = new HashMap();
>> >>>>>>>>> mapIn.put("localeString", localeString);
>> >>>>>>>>> mapIn.put("objectInfo", textData);
>> >>>>>>>>> mapIn.put("userLogin", userLogin);
>> >>>>>>>>> mapIn.put("dataResourceTypeId", "SHORT_TEXT");
>> >>>>>>>>> mapIn.put("mimeTypeId", "text/plain");
>> >>>>>>>>> result = dispatcher.runSync("createDataResource",
>> >>>>>>>>>
>> >>>>>>>> mapIn);
>> >>>>> String dataResourceId =
>> >>>>>>>>> (String)result.get("dataResourceId");
>> >>>>>>>>>
>> >>>>>>>>> mapIn = new HashMap();
>> >>>>>>>>> mapIn.put("localeString", localeString);
>> >>>>>>>>> mapIn.put("textData", textData);
>> >>>>>>>>> mapIn.put("description", description);
>> >>>>>>>>> mapIn.put("userLogin", userLogin);
>> >>>>>>>>> mapIn.put("dataResourceId", dataResourceId);
>> >>>>>>>>> result = dispatcher.runSync("createContent", mapIn);
>> >>>>>>>>> String contentId = (String)result.get("contentId");
>> >>>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>> // Create assoc to SurveyQuestionOption
>> >>>>>>>>> // Angelo, note that this is not the ContentAssoc
>> >>>>>>>>> entity
>> >>>>>>>>> that you would use.
>> >>>>>>>>> // I think you would just use the createContentAssoc
>> >>>>>>>>>
>> >>>>>>>> service
>> >>>>>>>>
>> >>>>>>>>> here instead
>> >>>>>>>>> // And I would use FastMaps because that is the OFBiz
>> >>>>>>>>>
>> >>>>>>>> way.
>> >>>>> mapIn = new HashMap();
>> >>>>>>>>> mapIn.put("localeString", localeString);
>> >>>>>>>>> mapIn.put("contentId", contentId);
>> >>>>>>>>> mapIn.put("surveyAnswerOptionId",
>> >>>>>>>>> surveyAnswerOptionId);
>> >>>>>>>>> mapIn.put("userLogin", userLogin);
>> >>>>>>>>> Map result2 =
>> >>>>>>>>> dispatcher.runSync("createSurveyAnswerOptionContentAssoc",
>> mapIn);
>> >>>>>>>>>
>> >>>>>>>>> In my mind, that is still a lot of code, when there are only a
>> few
>> >>>>>>>>>
>> >>>>>>>> pieces
>> >>>>> of
>> >>>>>>>>> data, but you might want to stick to something like this for now.
>> >>>>>>>>>
>> >>>>>>>>> Sorry I can't be of more help, but I have forgotten much of what
>> I
>> >>>>>>>>> did
>> >>>>>>>>> before. With Hans taking an interest in CMS, maybe things will
>> get
>> >>>>>>>>> improved.
>> >>>>>>>>>
>> >>>>>>>>> -Al
>> >>>>>>>>>
>> >>>>>>>>> On Thu, Jan 22, 2009 at 12:00 PM, Angelo Matarazzo <
>> >>>>>>>>> matarazzoangelo@gmail.com> wrote:
>> >>>>>>>>>
>> >>>>>>>>> Hi,
>> >>>>>>>>>> I am following the debate between Hans and David about Content
>> >>>>>>>>>>
>> >>>>>>>>> Component.
>> >>>>>>>>> I am looking at a way to upload a resource and integrate it in
>> >>>>>>>>> database.
>> >>>>>>>>> In Content Component there is a java service:
>> persistContentAndAssoc
>> >>>>>>>>> which
>> >>>>>>>>>
>> >>>>>>>>>> is called very often.
>> >>>>>>>>>> Instead in Party Component it seems that this service is
>> replaced
>> >>>>>>>>>> by
>> >>>>>>>>>> uploadPartyContentFile which don't call "persistContentAndAssoc"
>> >>>>>>>>>> but
>> >>>>>>>>>>
>> >>>>>>>>> other
>> >>>>>>>>>
>> >>>>>>>>>> services.
>> >>>>>>>>>> Why?
>> >>>>>>>>>> To upload a file it is better to follow Party Component?
>> >>>>>>>>>> "persistContentAndAssoc" is been replaced in the system?
>> >>>>>>>>>> Thank you.
>> >>>>>>>>>>
>> >>>>>>>>>>
>> >>>>>>>>>>
>> >>>>>>>>>>
>> >>>>>>>>>> --
>> >>>>>>>>>> View this message in context:
>> >>>>>>>>>> http://www.nabble.com/Content-Service-tp21610839p21610839.html
>> >>>>>>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>> >>>>>>>>>>
>> >>>>>>>>>>
>> >>>>>>>>>>
>> >>> -----BEGIN PGP SIGNATURE-----
>> >>> Version: GnuPG v1.4.6 (MingW32)
>> >>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>> >>>
>> >>> iD8DBQFJemWVrP3NbaWWqE4RAsigAJ4rGD5YqIdr3XLvQIFOUaHAjlmFNACfX75b
>> >>> AEnl5fRRyStCdMp07kTPX7Y=
>> >>> =IlTd
>> >>> -----END PGP SIGNATURE-----
>> >>>
>> >>
>> >
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.6 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFJeuhUrP3NbaWWqE4RAk0zAKCBnyb1nY7469MvsKFHVirfBnxQYACgxoJB
>> bXGrE9FPtSmpUil6s0Jpulg=
>> =CmTS
>> -----END PGP SIGNATURE-----
>>
>

Re: Content Service

Posted by Bruno Busco <br...@gmail.com>.
Vince,
I generally agree with you that usually it is better to not re-invent the
wheel and use as much as possible what other do and offer.
On the other hand, using our own tools and base bricks to implement what we
need is something that has some advantage too.

Integrating a complex component like the one that you propose, I guess, has
not a so limited drawback as integrating a captcha library or a pdf
renderer.
The Content Manager has its own persistence system that we already have and
all OFBiz relyies on.
Also the Portal system has been (quite) easily developed leveraging on the
base tools OFBiz offers.

This kind of approach (the home grown) is usefull becouse we have time to
better understand what are our true needs and we use (and improve) the OFBiz
framework to reach them.

On a side path, a search for more "standard" alternative is, of course,
beneficial but we should evaluate if the standard package integration takes
us toward a simpler and more powerfull OFBiz or toward a Frankestein system.

In conclusion I think that considering an external package integration
always needs a deep knowledge of its implementation or at least of its
interface to the rest of the framework. This also needs time. Do we have
this time?

My two cents.
-Bruno


2009/1/25 Vince M. Clark <vc...@globalera.com>

> I posed the question yesterday about integrating with Lenya. I've done more
> research since then and realized that apparently Lenya does not yet
> implement any standards such as JCR, which was really the point of my
> question.
>
> So I want to raise a larger issue. It is my opinion that certain things
> should not be built from scratch within OfBiz. CMS is one of them, Portal
> was another. When the portal topic came up I made a similar suggestion that
> we consider integration with other portal technologies rather than building
> our own. Standards exist for portals as well.
>
> So my research led me to Jackrabbit. Another Apache project that implements
> JCR 1.0.
> http://jackrabbit.apache.org/
>
> It seems to be just an API, so OfBiz security, persistence, UI, etc. would
> still apply. Taking this approach would make integration easier for people
> using other CMS's, right?
>
> Looking forward to your responses...
>
> ----- Original Message -----
> From: "BJ Freeman" <bj...@free-man.net>
> To: user@ofbiz.apache.org
> Sent: Saturday, January 24, 2009 3:07:16 AM (GMT-0700) America/Denver
> Subject: Re: Content Service
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Actually the SEAS of ofbiz allows you the flexibility of doing what you
> describe in Drupal.
> You have security for Services and UI, so I don't see what Drupal has in
> that regard that is any better.
>
> Sounds like you comparing ofbiz and drupal from a Database perspective
> instead of a functional level.
>
> Milind Parikh sent the following on 1/23/2009 9:30 PM:
> > First of all, I agree that anyone attempting to rewrite the content
> > management system within OfBiz should look the current implementation. It
> is
> > pretty robust and maintains a lot of data and the meta data required to
> > manage the content. For example, it has the concept of revision built in.
> >
> > However, competing with Drupal can be tough and hard; in the CMS space.
> > Since Drupal has the unusual structure of workflow in calling different
> > functions in a module at predetermined points, modules can themselves add
> > different tables, change display and change basic functions in a drastic
> > way; but very simply. For example, a module can prevent access to
> specific
> > fields in specific content; depending upon the role of the person logging
> > in. Certainly drupal development has reached a very furious pace; because
> of
> > the manner in which individuals can contribute through modules.
> >
> > Having said that, there is no substitute for the rigor of standardized
> > database structures; especially in the business world. Following best
> > practices in data modeling is key for success to any complex
> implementation.
> > Also having standardized APIs that enable integration to the rest of the
> > world is very important as well.
> >
> > Just my two cents...
> >
> > On Fri, Jan 23, 2009 at 8:28 PM, David E Jones
> > <da...@hotwaxmedia.com>wrote:
> >
> >> Not that I think we should do that, but why would it be hard? It's just
> >> tables in a database, screens that read from and write to the data...
> >>
> >> On the other hand, if anyone wants to research that I'd recommend
> >> researching the OFBiz stuff first so you can understand what it is like
> and
> >> what it supports. No sense replacing something that already takes care
> of
> >> your needs, even if you didn't know it.
> >>
> >> -David
> >>
> >>
> >>
> >> On Jan 23, 2009, at 5:49 PM, BJ Freeman wrote:
> >>
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >>> Hash: SHA1
> >>>
> >>> Yup. The hard part is to work with in the confines of ofbiz framework.
> >>> takes a lot of time to chart the flow of drupal then apply it to ofbiz.
> >>>
> >>> Milind Parikh sent the following on 1/23/2009 4:05 PM:
> >>>
> >>>> I did not mean integration with an PHP based application. Just the
> design
> >>>> philosophy of the data structures and the concept of modules in drupal
> >>>> (of
> >>>> course, this is easier in a dynamically typed language like php).
> >>>>
> >>>> Regards
> >>>> - Milind
> >>>>
> >>>>
> >>>> On Fri, Jan 23, 2009 at 3:45 PM, BJ Freeman <bj...@free-man.net>
> wrote:
> >>>>
> >>>> the problem with integration of a PHP based application is it is a
> >>>> completely separate application and coding style.
> >>>>
> >>>> Milind Parikh sent the following on 1/22/2009 12:34 PM:
> >>>>
> >>>>> There is a lot of interest in CMS. I would suggest also looking at
> >>>>>> Drupal's
> >>>>> way of doing CMS (drupal,org) as I believe that it is very
> interesting
> >>>>>> and
> >>>>> flexible. However it is more suited to the web (as opposed to
> enterprise
> >>>>>>> content management).
> >>>>>>>
> >>>>>>> -- Milind
> >>>>>>>
> >>>>>>>
> >>>>>>> On Thu, Jan 22, 2009 at 12:27 PM, Bruno Busco <
> bruno.busco@gmail.com>
> >>>>>>>
> >>>>>> wrote:
> >>>>> Hi Al,
> >>>>>>>> I do not want to hijack the thread but I think there is more
> interest
> >>>>>>>> in
> >>>>>>>> CMS
> >>>>>>>> than you could believe.
> >>>>>>>>
> >>>>>>>> There were also discussions on using OFBiz CMS to host the OFBiz
> Web
> >>>>>>>>
> >>>>>>> site
> >>>>> itself.
> >>>>>>>> This would be great and, may be, now that it seems you are back
> >>>>>>>> on-line,
> >>>>>>>>
> >>>>>>> we
> >>>>> could have better chance.
> >>>>>>>> Thank you,
> >>>>>>>> Bruno
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> 2009/1/22 Al Byers <by...@automationgroups.com>
> >>>>>>>>
> >>>>>>>> Angelo,
> >>>>>>>>> I implemented the CMS years ago per David's design. At the time,
> I
> >>>>>>>>>
> >>>>>>>> thought
> >>>>>>>>
> >>>>>>>>> it would be wise to have a single service,
> persistContentAndAssoc,
> >>>>>>>>>
> >>>>>>>> which
> >>>>> did
> >>>>>>>>> everything - creating and updating, all types of media and all
> >>>>>>>>> possible
> >>>>>>>>> repositories (ie. database, filesystem, etc). I am not convinced
> >>>>>>>>> that
> >>>>>>>>>
> >>>>>>>> it
> >>>>> would not be nice to have such a tool, even though it tends to go
> >>>>>>>> against
> >>>>> the "OFBiz way" (I claim that for a T-shirt). I don't think
> >>>>>>>>> persistContentAndAssoc is that tool, though I would love someone
> to
> >>>>>>>>>
> >>>>>>>> improve
> >>>>>>>>
> >>>>>>>>> on it or simplify it.
> >>>>>>>>>
> >>>>>>>>> Not having a clear API for working with the CMS is its greatest
> >>>>>>>>>
> >>>>>>>> drawback,
> >>>>> I
> >>>>>>>>> think. Saner heads than mine have broken the persist process into
> >>>>>>>>>
> >>>>>>>> multiple
> >>>>>>>>
> >>>>>>>>> steps. I drew from what they have done and here is how I recently
> >>>>>>>>> did a
> >>>>>>>>> simple text persist:
> >>>>>>>>> ...
> >>>>>>>>> String localeString = (String)entry.getKey();
> >>>>>>>>> String textData = (String)entry.getValue();
> >>>>>>>>> // Create new content
> >>>>>>>>> mapIn = new HashMap();
> >>>>>>>>> mapIn.put("localeString", localeString);
> >>>>>>>>> mapIn.put("objectInfo", textData);
> >>>>>>>>> mapIn.put("userLogin", userLogin);
> >>>>>>>>> mapIn.put("dataResourceTypeId", "SHORT_TEXT");
> >>>>>>>>> mapIn.put("mimeTypeId", "text/plain");
> >>>>>>>>> result = dispatcher.runSync("createDataResource",
> >>>>>>>>>
> >>>>>>>> mapIn);
> >>>>> String dataResourceId =
> >>>>>>>>> (String)result.get("dataResourceId");
> >>>>>>>>>
> >>>>>>>>> mapIn = new HashMap();
> >>>>>>>>> mapIn.put("localeString", localeString);
> >>>>>>>>> mapIn.put("textData", textData);
> >>>>>>>>> mapIn.put("description", description);
> >>>>>>>>> mapIn.put("userLogin", userLogin);
> >>>>>>>>> mapIn.put("dataResourceId", dataResourceId);
> >>>>>>>>> result = dispatcher.runSync("createContent", mapIn);
> >>>>>>>>> String contentId = (String)result.get("contentId");
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> // Create assoc to SurveyQuestionOption
> >>>>>>>>> // Angelo, note that this is not the ContentAssoc
> >>>>>>>>> entity
> >>>>>>>>> that you would use.
> >>>>>>>>> // I think you would just use the createContentAssoc
> >>>>>>>>>
> >>>>>>>> service
> >>>>>>>>
> >>>>>>>>> here instead
> >>>>>>>>> // And I would use FastMaps because that is the OFBiz
> >>>>>>>>>
> >>>>>>>> way.
> >>>>> mapIn = new HashMap();
> >>>>>>>>> mapIn.put("localeString", localeString);
> >>>>>>>>> mapIn.put("contentId", contentId);
> >>>>>>>>> mapIn.put("surveyAnswerOptionId",
> >>>>>>>>> surveyAnswerOptionId);
> >>>>>>>>> mapIn.put("userLogin", userLogin);
> >>>>>>>>> Map result2 =
> >>>>>>>>> dispatcher.runSync("createSurveyAnswerOptionContentAssoc",
> mapIn);
> >>>>>>>>>
> >>>>>>>>> In my mind, that is still a lot of code, when there are only a
> few
> >>>>>>>>>
> >>>>>>>> pieces
> >>>>> of
> >>>>>>>>> data, but you might want to stick to something like this for now.
> >>>>>>>>>
> >>>>>>>>> Sorry I can't be of more help, but I have forgotten much of what
> I
> >>>>>>>>> did
> >>>>>>>>> before. With Hans taking an interest in CMS, maybe things will
> get
> >>>>>>>>> improved.
> >>>>>>>>>
> >>>>>>>>> -Al
> >>>>>>>>>
> >>>>>>>>> On Thu, Jan 22, 2009 at 12:00 PM, Angelo Matarazzo <
> >>>>>>>>> matarazzoangelo@gmail.com> wrote:
> >>>>>>>>>
> >>>>>>>>> Hi,
> >>>>>>>>>> I am following the debate between Hans and David about Content
> >>>>>>>>>>
> >>>>>>>>> Component.
> >>>>>>>>> I am looking at a way to upload a resource and integrate it in
> >>>>>>>>> database.
> >>>>>>>>> In Content Component there is a java service:
> persistContentAndAssoc
> >>>>>>>>> which
> >>>>>>>>>
> >>>>>>>>>> is called very often.
> >>>>>>>>>> Instead in Party Component it seems that this service is
> replaced
> >>>>>>>>>> by
> >>>>>>>>>> uploadPartyContentFile which don't call "persistContentAndAssoc"
> >>>>>>>>>> but
> >>>>>>>>>>
> >>>>>>>>> other
> >>>>>>>>>
> >>>>>>>>>> services.
> >>>>>>>>>> Why?
> >>>>>>>>>> To upload a file it is better to follow Party Component?
> >>>>>>>>>> "persistContentAndAssoc" is been replaced in the system?
> >>>>>>>>>> Thank you.
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> --
> >>>>>>>>>> View this message in context:
> >>>>>>>>>> http://www.nabble.com/Content-Service-tp21610839p21610839.html
> >>>>>>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>> -----BEGIN PGP SIGNATURE-----
> >>> Version: GnuPG v1.4.6 (MingW32)
> >>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >>>
> >>> iD8DBQFJemWVrP3NbaWWqE4RAsigAJ4rGD5YqIdr3XLvQIFOUaHAjlmFNACfX75b
> >>> AEnl5fRRyStCdMp07kTPX7Y=
> >>> =IlTd
> >>> -----END PGP SIGNATURE-----
> >>>
> >>
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFJeuhUrP3NbaWWqE4RAk0zAKCBnyb1nY7469MvsKFHVirfBnxQYACgxoJB
> bXGrE9FPtSmpUil6s0Jpulg=
> =CmTS
> -----END PGP SIGNATURE-----
>

Re: Content Service

Posted by "Vince M. Clark" <vc...@globalera.com>.
I posed the question yesterday about integrating with Lenya. I've done more research since then and realized that apparently Lenya does not yet implement any standards such as JCR, which was really the point of my question. 

So I want to raise a larger issue. It is my opinion that certain things should not be built from scratch within OfBiz. CMS is one of them, Portal was another. When the portal topic came up I made a similar suggestion that we consider integration with other portal technologies rather than building our own. Standards exist for portals as well. 

So my research led me to Jackrabbit. Another Apache project that implements JCR 1.0. 
http://jackrabbit.apache.org/ 

It seems to be just an API, so OfBiz security, persistence, UI, etc. would still apply. Taking this approach would make integration easier for people using other CMS's, right? 

Looking forward to your responses... 

----- Original Message ----- 
From: "BJ Freeman" <bj...@free-man.net> 
To: user@ofbiz.apache.org 
Sent: Saturday, January 24, 2009 3:07:16 AM (GMT-0700) America/Denver 
Subject: Re: Content Service 

-----BEGIN PGP SIGNED MESSAGE----- 
Hash: SHA1 

Actually the SEAS of ofbiz allows you the flexibility of doing what you 
describe in Drupal. 
You have security for Services and UI, so I don't see what Drupal has in 
that regard that is any better. 

Sounds like you comparing ofbiz and drupal from a Database perspective 
instead of a functional level. 

Milind Parikh sent the following on 1/23/2009 9:30 PM: 
> First of all, I agree that anyone attempting to rewrite the content 
> management system within OfBiz should look the current implementation. It is 
> pretty robust and maintains a lot of data and the meta data required to 
> manage the content. For example, it has the concept of revision built in. 
> 
> However, competing with Drupal can be tough and hard; in the CMS space. 
> Since Drupal has the unusual structure of workflow in calling different 
> functions in a module at predetermined points, modules can themselves add 
> different tables, change display and change basic functions in a drastic 
> way; but very simply. For example, a module can prevent access to specific 
> fields in specific content; depending upon the role of the person logging 
> in. Certainly drupal development has reached a very furious pace; because of 
> the manner in which individuals can contribute through modules. 
> 
> Having said that, there is no substitute for the rigor of standardized 
> database structures; especially in the business world. Following best 
> practices in data modeling is key for success to any complex implementation. 
> Also having standardized APIs that enable integration to the rest of the 
> world is very important as well. 
> 
> Just my two cents... 
> 
> On Fri, Jan 23, 2009 at 8:28 PM, David E Jones 
> <da...@hotwaxmedia.com>wrote: 
> 
>> Not that I think we should do that, but why would it be hard? It's just 
>> tables in a database, screens that read from and write to the data... 
>> 
>> On the other hand, if anyone wants to research that I'd recommend 
>> researching the OFBiz stuff first so you can understand what it is like and 
>> what it supports. No sense replacing something that already takes care of 
>> your needs, even if you didn't know it. 
>> 
>> -David 
>> 
>> 
>> 
>> On Jan 23, 2009, at 5:49 PM, BJ Freeman wrote: 
>> 
>> -----BEGIN PGP SIGNED MESSAGE----- 
>>> Hash: SHA1 
>>> 
>>> Yup. The hard part is to work with in the confines of ofbiz framework. 
>>> takes a lot of time to chart the flow of drupal then apply it to ofbiz. 
>>> 
>>> Milind Parikh sent the following on 1/23/2009 4:05 PM: 
>>> 
>>>> I did not mean integration with an PHP based application. Just the design 
>>>> philosophy of the data structures and the concept of modules in drupal 
>>>> (of 
>>>> course, this is easier in a dynamically typed language like php). 
>>>> 
>>>> Regards 
>>>> - Milind 
>>>> 
>>>> 
>>>> On Fri, Jan 23, 2009 at 3:45 PM, BJ Freeman <bj...@free-man.net> wrote: 
>>>> 
>>>> the problem with integration of a PHP based application is it is a 
>>>> completely separate application and coding style. 
>>>> 
>>>> Milind Parikh sent the following on 1/22/2009 12:34 PM: 
>>>> 
>>>>> There is a lot of interest in CMS. I would suggest also looking at 
>>>>>> Drupal's 
>>>>> way of doing CMS (drupal,org) as I believe that it is very interesting 
>>>>>> and 
>>>>> flexible. However it is more suited to the web (as opposed to enterprise 
>>>>>>> content management). 
>>>>>>> 
>>>>>>> -- Milind 
>>>>>>> 
>>>>>>> 
>>>>>>> On Thu, Jan 22, 2009 at 12:27 PM, Bruno Busco <br...@gmail.com> 
>>>>>>> 
>>>>>> wrote: 
>>>>> Hi Al, 
>>>>>>>> I do not want to hijack the thread but I think there is more interest 
>>>>>>>> in 
>>>>>>>> CMS 
>>>>>>>> than you could believe. 
>>>>>>>> 
>>>>>>>> There were also discussions on using OFBiz CMS to host the OFBiz Web 
>>>>>>>> 
>>>>>>> site 
>>>>> itself. 
>>>>>>>> This would be great and, may be, now that it seems you are back 
>>>>>>>> on-line, 
>>>>>>>> 
>>>>>>> we 
>>>>> could have better chance. 
>>>>>>>> Thank you, 
>>>>>>>> Bruno 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 2009/1/22 Al Byers <by...@automationgroups.com> 
>>>>>>>> 
>>>>>>>> Angelo, 
>>>>>>>>> I implemented the CMS years ago per David's design. At the time, I 
>>>>>>>>> 
>>>>>>>> thought 
>>>>>>>> 
>>>>>>>>> it would be wise to have a single service, persistContentAndAssoc, 
>>>>>>>>> 
>>>>>>>> which 
>>>>> did 
>>>>>>>>> everything - creating and updating, all types of media and all 
>>>>>>>>> possible 
>>>>>>>>> repositories (ie. database, filesystem, etc). I am not convinced 
>>>>>>>>> that 
>>>>>>>>> 
>>>>>>>> it 
>>>>> would not be nice to have such a tool, even though it tends to go 
>>>>>>>> against 
>>>>> the "OFBiz way" (I claim that for a T-shirt). I don't think 
>>>>>>>>> persistContentAndAssoc is that tool, though I would love someone to 
>>>>>>>>> 
>>>>>>>> improve 
>>>>>>>> 
>>>>>>>>> on it or simplify it. 
>>>>>>>>> 
>>>>>>>>> Not having a clear API for working with the CMS is its greatest 
>>>>>>>>> 
>>>>>>>> drawback, 
>>>>> I 
>>>>>>>>> think. Saner heads than mine have broken the persist process into 
>>>>>>>>> 
>>>>>>>> multiple 
>>>>>>>> 
>>>>>>>>> steps. I drew from what they have done and here is how I recently 
>>>>>>>>> did a 
>>>>>>>>> simple text persist: 
>>>>>>>>> ... 
>>>>>>>>> String localeString = (String)entry.getKey(); 
>>>>>>>>> String textData = (String)entry.getValue(); 
>>>>>>>>> // Create new content 
>>>>>>>>> mapIn = new HashMap(); 
>>>>>>>>> mapIn.put("localeString", localeString); 
>>>>>>>>> mapIn.put("objectInfo", textData); 
>>>>>>>>> mapIn.put("userLogin", userLogin); 
>>>>>>>>> mapIn.put("dataResourceTypeId", "SHORT_TEXT"); 
>>>>>>>>> mapIn.put("mimeTypeId", "text/plain"); 
>>>>>>>>> result = dispatcher.runSync("createDataResource", 
>>>>>>>>> 
>>>>>>>> mapIn); 
>>>>> String dataResourceId = 
>>>>>>>>> (String)result.get("dataResourceId"); 
>>>>>>>>> 
>>>>>>>>> mapIn = new HashMap(); 
>>>>>>>>> mapIn.put("localeString", localeString); 
>>>>>>>>> mapIn.put("textData", textData); 
>>>>>>>>> mapIn.put("description", description); 
>>>>>>>>> mapIn.put("userLogin", userLogin); 
>>>>>>>>> mapIn.put("dataResourceId", dataResourceId); 
>>>>>>>>> result = dispatcher.runSync("createContent", mapIn); 
>>>>>>>>> String contentId = (String)result.get("contentId"); 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> // Create assoc to SurveyQuestionOption 
>>>>>>>>> // Angelo, note that this is not the ContentAssoc 
>>>>>>>>> entity 
>>>>>>>>> that you would use. 
>>>>>>>>> // I think you would just use the createContentAssoc 
>>>>>>>>> 
>>>>>>>> service 
>>>>>>>> 
>>>>>>>>> here instead 
>>>>>>>>> // And I would use FastMaps because that is the OFBiz 
>>>>>>>>> 
>>>>>>>> way. 
>>>>> mapIn = new HashMap(); 
>>>>>>>>> mapIn.put("localeString", localeString); 
>>>>>>>>> mapIn.put("contentId", contentId); 
>>>>>>>>> mapIn.put("surveyAnswerOptionId", 
>>>>>>>>> surveyAnswerOptionId); 
>>>>>>>>> mapIn.put("userLogin", userLogin); 
>>>>>>>>> Map result2 = 
>>>>>>>>> dispatcher.runSync("createSurveyAnswerOptionContentAssoc", mapIn); 
>>>>>>>>> 
>>>>>>>>> In my mind, that is still a lot of code, when there are only a few 
>>>>>>>>> 
>>>>>>>> pieces 
>>>>> of 
>>>>>>>>> data, but you might want to stick to something like this for now. 
>>>>>>>>> 
>>>>>>>>> Sorry I can't be of more help, but I have forgotten much of what I 
>>>>>>>>> did 
>>>>>>>>> before. With Hans taking an interest in CMS, maybe things will get 
>>>>>>>>> improved. 
>>>>>>>>> 
>>>>>>>>> -Al 
>>>>>>>>> 
>>>>>>>>> On Thu, Jan 22, 2009 at 12:00 PM, Angelo Matarazzo < 
>>>>>>>>> matarazzoangelo@gmail.com> wrote: 
>>>>>>>>> 
>>>>>>>>> Hi, 
>>>>>>>>>> I am following the debate between Hans and David about Content 
>>>>>>>>>> 
>>>>>>>>> Component. 
>>>>>>>>> I am looking at a way to upload a resource and integrate it in 
>>>>>>>>> database. 
>>>>>>>>> In Content Component there is a java service: persistContentAndAssoc 
>>>>>>>>> which 
>>>>>>>>> 
>>>>>>>>>> is called very often. 
>>>>>>>>>> Instead in Party Component it seems that this service is replaced 
>>>>>>>>>> by 
>>>>>>>>>> uploadPartyContentFile which don't call "persistContentAndAssoc" 
>>>>>>>>>> but 
>>>>>>>>>> 
>>>>>>>>> other 
>>>>>>>>> 
>>>>>>>>>> services. 
>>>>>>>>>> Why? 
>>>>>>>>>> To upload a file it is better to follow Party Component? 
>>>>>>>>>> "persistContentAndAssoc" is been replaced in the system? 
>>>>>>>>>> Thank you. 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> -- 
>>>>>>>>>> View this message in context: 
>>>>>>>>>> http://www.nabble.com/Content-Service-tp21610839p21610839.html 
>>>>>>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com. 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>> -----BEGIN PGP SIGNATURE----- 
>>> Version: GnuPG v1.4.6 (MingW32) 
>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org 
>>> 
>>> iD8DBQFJemWVrP3NbaWWqE4RAsigAJ4rGD5YqIdr3XLvQIFOUaHAjlmFNACfX75b 
>>> AEnl5fRRyStCdMp07kTPX7Y= 
>>> =IlTd 
>>> -----END PGP SIGNATURE----- 
>>> 
>> 
> 
-----BEGIN PGP SIGNATURE----- 
Version: GnuPG v1.4.6 (MingW32) 
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org 

iD8DBQFJeuhUrP3NbaWWqE4RAk0zAKCBnyb1nY7469MvsKFHVirfBnxQYACgxoJB 
bXGrE9FPtSmpUil6s0Jpulg= 
=CmTS 
-----END PGP SIGNATURE----- 

Re: Content Service

Posted by BJ Freeman <bj...@free-man.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Actually the SEAS of ofbiz allows you the flexibility of doing what you
describe in Drupal.
You have security for Services and UI, so I don't see what Drupal has in
that regard that is any better.

Sounds like you comparing ofbiz and drupal from a Database perspective
instead of a functional level.

Milind Parikh sent the following on 1/23/2009 9:30 PM:
> First of all, I agree that anyone attempting to rewrite the content
> management system within OfBiz should look the current implementation. It is
> pretty robust and maintains a lot of data and the meta data required to
> manage the content. For example, it has the concept of revision built in.
> 
> However, competing with Drupal can be tough and hard; in the CMS space.
> Since Drupal has the unusual structure of workflow in calling different
> functions in a module at predetermined points, modules can themselves add
> different tables, change display and change basic functions in a drastic
> way; but very simply. For example, a module can prevent access to specific
> fields in specific content; depending upon the role of the person logging
> in. Certainly drupal development has reached a very furious pace; because of
> the manner in which individuals can contribute through modules.
> 
> Having said that, there is no substitute for the rigor of standardized
> database structures; especially in the business world. Following best
> practices in data modeling is key for success to any complex implementation.
> Also having standardized APIs that enable integration  to the rest of the
> world is very important as well.
> 
> Just my two cents...
> 
> On Fri, Jan 23, 2009 at 8:28 PM, David E Jones
> <da...@hotwaxmedia.com>wrote:
> 
>> Not that I think we should do that, but why would it be hard? It's just
>> tables in a database, screens that read from and write to the data...
>>
>> On the other hand, if anyone wants to research that I'd recommend
>> researching the OFBiz stuff first so you can understand what it is like and
>> what it supports. No sense replacing something that already takes care of
>> your needs, even if you didn't know it.
>>
>> -David
>>
>>
>>
>> On Jan 23, 2009, at 5:49 PM, BJ Freeman wrote:
>>
>>  -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Yup. The hard part is to work with in the confines of ofbiz framework.
>>> takes a lot of time to chart the flow of drupal then apply it to ofbiz.
>>>
>>> Milind Parikh sent the following on 1/23/2009 4:05 PM:
>>>
>>>> I did not mean integration with an PHP based application. Just the design
>>>> philosophy of the data structures and the concept of modules in drupal
>>>> (of
>>>> course, this is easier in a dynamically typed language like php).
>>>>
>>>> Regards
>>>> - Milind
>>>>
>>>>
>>>> On Fri, Jan 23, 2009 at 3:45 PM, BJ Freeman <bj...@free-man.net> wrote:
>>>>
>>>> the problem with integration of a PHP based application is it is a
>>>> completely separate application and coding style.
>>>>
>>>> Milind Parikh sent the following on 1/22/2009 12:34 PM:
>>>>
>>>>> There is a lot of interest in CMS. I would suggest also looking at
>>>>>> Drupal's
>>>>> way of doing CMS (drupal,org) as I believe that it is very interesting
>>>>>> and
>>>>> flexible. However it is more suited to the web (as opposed to enterprise
>>>>>>> content management).
>>>>>>>
>>>>>>> -- Milind
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jan 22, 2009 at 12:27 PM, Bruno Busco <br...@gmail.com>
>>>>>>>
>>>>>> wrote:
>>>>> Hi Al,
>>>>>>>> I do not want to hijack the thread but I think there is more interest
>>>>>>>> in
>>>>>>>> CMS
>>>>>>>> than you could believe.
>>>>>>>>
>>>>>>>> There were also discussions on using OFBiz CMS to host the OFBiz Web
>>>>>>>>
>>>>>>> site
>>>>> itself.
>>>>>>>> This would be great and, may be, now that it seems you are back
>>>>>>>> on-line,
>>>>>>>>
>>>>>>> we
>>>>> could have better chance.
>>>>>>>> Thank you,
>>>>>>>> Bruno
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 2009/1/22 Al Byers <by...@automationgroups.com>
>>>>>>>>
>>>>>>>>  Angelo,
>>>>>>>>> I implemented the CMS years ago per David's design. At the time, I
>>>>>>>>>
>>>>>>>> thought
>>>>>>>>
>>>>>>>>> it would be wise to have a single service, persistContentAndAssoc,
>>>>>>>>>
>>>>>>>> which
>>>>> did
>>>>>>>>> everything - creating and updating, all types of media and all
>>>>>>>>> possible
>>>>>>>>> repositories (ie. database, filesystem, etc). I am not convinced
>>>>>>>>> that
>>>>>>>>>
>>>>>>>> it
>>>>> would not be nice to have such a tool, even though it tends to go
>>>>>>>> against
>>>>> the "OFBiz way" (I claim that for a T-shirt). I don't think
>>>>>>>>> persistContentAndAssoc is that tool, though I would love someone to
>>>>>>>>>
>>>>>>>> improve
>>>>>>>>
>>>>>>>>> on it or simplify it.
>>>>>>>>>
>>>>>>>>> Not having a clear API for working with the CMS is its greatest
>>>>>>>>>
>>>>>>>> drawback,
>>>>> I
>>>>>>>>> think. Saner heads than mine have broken the persist process into
>>>>>>>>>
>>>>>>>> multiple
>>>>>>>>
>>>>>>>>> steps. I drew from what they have done and here is how I recently
>>>>>>>>> did a
>>>>>>>>> simple text persist:
>>>>>>>>>             ...
>>>>>>>>>             String localeString = (String)entry.getKey();
>>>>>>>>>              String textData = (String)entry.getValue();
>>>>>>>>>              // Create new content
>>>>>>>>>              mapIn = new HashMap();
>>>>>>>>>              mapIn.put("localeString", localeString);
>>>>>>>>>              mapIn.put("objectInfo", textData);
>>>>>>>>>              mapIn.put("userLogin", userLogin);
>>>>>>>>>              mapIn.put("dataResourceTypeId", "SHORT_TEXT");
>>>>>>>>>              mapIn.put("mimeTypeId", "text/plain");
>>>>>>>>>              result = dispatcher.runSync("createDataResource",
>>>>>>>>>
>>>>>>>> mapIn);
>>>>>              String dataResourceId =
>>>>>>>>> (String)result.get("dataResourceId");
>>>>>>>>>
>>>>>>>>>              mapIn = new HashMap();
>>>>>>>>>              mapIn.put("localeString", localeString);
>>>>>>>>>              mapIn.put("textData", textData);
>>>>>>>>>              mapIn.put("description", description);
>>>>>>>>>              mapIn.put("userLogin", userLogin);
>>>>>>>>>              mapIn.put("dataResourceId", dataResourceId);
>>>>>>>>>              result = dispatcher.runSync("createContent", mapIn);
>>>>>>>>>              String contentId = (String)result.get("contentId");
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>              // Create assoc to SurveyQuestionOption
>>>>>>>>>              // Angelo, note that this is not the ContentAssoc
>>>>>>>>> entity
>>>>>>>>> that you would use.
>>>>>>>>>              // I think you would just use the createContentAssoc
>>>>>>>>>
>>>>>>>> service
>>>>>>>>
>>>>>>>>> here instead
>>>>>>>>>              // And I would use FastMaps because that is the OFBiz
>>>>>>>>>
>>>>>>>> way.
>>>>>              mapIn = new HashMap();
>>>>>>>>>              mapIn.put("localeString", localeString);
>>>>>>>>>              mapIn.put("contentId", contentId);
>>>>>>>>>              mapIn.put("surveyAnswerOptionId",
>>>>>>>>> surveyAnswerOptionId);
>>>>>>>>>              mapIn.put("userLogin", userLogin);
>>>>>>>>>              Map result2 =
>>>>>>>>> dispatcher.runSync("createSurveyAnswerOptionContentAssoc", mapIn);
>>>>>>>>>
>>>>>>>>> In my mind, that is still a lot of code, when there are only a few
>>>>>>>>>
>>>>>>>> pieces
>>>>> of
>>>>>>>>> data, but you might want to stick to something like this for now.
>>>>>>>>>
>>>>>>>>> Sorry I can't be of more help, but I have forgotten much of what I
>>>>>>>>> did
>>>>>>>>> before. With Hans taking an interest in CMS, maybe things will get
>>>>>>>>> improved.
>>>>>>>>>
>>>>>>>>> -Al
>>>>>>>>>
>>>>>>>>> On Thu, Jan 22, 2009 at 12:00 PM, Angelo Matarazzo <
>>>>>>>>> matarazzoangelo@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>  Hi,
>>>>>>>>>> I am following the debate between Hans and David about Content
>>>>>>>>>>
>>>>>>>>> Component.
>>>>>>>>> I am looking at a way to upload a resource and integrate it in
>>>>>>>>> database.
>>>>>>>>> In Content Component there is a java service: persistContentAndAssoc
>>>>>>>>> which
>>>>>>>>>
>>>>>>>>>> is called very often.
>>>>>>>>>> Instead in Party Component it seems that this service is  replaced
>>>>>>>>>> by
>>>>>>>>>> uploadPartyContentFile which don't call "persistContentAndAssoc"
>>>>>>>>>> but
>>>>>>>>>>
>>>>>>>>> other
>>>>>>>>>
>>>>>>>>>> services.
>>>>>>>>>> Why?
>>>>>>>>>> To upload a file it is better to follow  Party Component?
>>>>>>>>>> "persistContentAndAssoc" is been replaced in the system?
>>>>>>>>>> Thank you.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> View this message in context:
>>>>>>>>>> http://www.nabble.com/Content-Service-tp21610839p21610839.html
>>>>>>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.4.6 (MingW32)
>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>>
>>> iD8DBQFJemWVrP3NbaWWqE4RAsigAJ4rGD5YqIdr3XLvQIFOUaHAjlmFNACfX75b
>>> AEnl5fRRyStCdMp07kTPX7Y=
>>> =IlTd
>>> -----END PGP SIGNATURE-----
>>>
>>
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJeuhUrP3NbaWWqE4RAk0zAKCBnyb1nY7469MvsKFHVirfBnxQYACgxoJB
bXGrE9FPtSmpUil6s0Jpulg=
=CmTS
-----END PGP SIGNATURE-----

Re: Content Service

Posted by Milind Parikh <mi...@gmail.com>.
First of all, I agree that anyone attempting to rewrite the content
management system within OfBiz should look the current implementation. It is
pretty robust and maintains a lot of data and the meta data required to
manage the content. For example, it has the concept of revision built in.

However, competing with Drupal can be tough and hard; in the CMS space.
Since Drupal has the unusual structure of workflow in calling different
functions in a module at predetermined points, modules can themselves add
different tables, change display and change basic functions in a drastic
way; but very simply. For example, a module can prevent access to specific
fields in specific content; depending upon the role of the person logging
in. Certainly drupal development has reached a very furious pace; because of
the manner in which individuals can contribute through modules.

Having said that, there is no substitute for the rigor of standardized
database structures; especially in the business world. Following best
practices in data modeling is key for success to any complex implementation.
Also having standardized APIs that enable integration  to the rest of the
world is very important as well.

Just my two cents...

On Fri, Jan 23, 2009 at 8:28 PM, David E Jones
<da...@hotwaxmedia.com>wrote:

>
> Not that I think we should do that, but why would it be hard? It's just
> tables in a database, screens that read from and write to the data...
>
> On the other hand, if anyone wants to research that I'd recommend
> researching the OFBiz stuff first so you can understand what it is like and
> what it supports. No sense replacing something that already takes care of
> your needs, even if you didn't know it.
>
> -David
>
>
>
> On Jan 23, 2009, at 5:49 PM, BJ Freeman wrote:
>
>  -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Yup. The hard part is to work with in the confines of ofbiz framework.
>> takes a lot of time to chart the flow of drupal then apply it to ofbiz.
>>
>> Milind Parikh sent the following on 1/23/2009 4:05 PM:
>>
>>> I did not mean integration with an PHP based application. Just the design
>>> philosophy of the data structures and the concept of modules in drupal
>>> (of
>>> course, this is easier in a dynamically typed language like php).
>>>
>>> Regards
>>> - Milind
>>>
>>>
>>> On Fri, Jan 23, 2009 at 3:45 PM, BJ Freeman <bj...@free-man.net> wrote:
>>>
>>> the problem with integration of a PHP based application is it is a
>>> completely separate application and coding style.
>>>
>>> Milind Parikh sent the following on 1/22/2009 12:34 PM:
>>>
>>>> There is a lot of interest in CMS. I would suggest also looking at
>>>>>>
>>>>> Drupal's
>>>
>>>> way of doing CMS (drupal,org) as I believe that it is very interesting
>>>>>>
>>>>> and
>>>
>>>> flexible. However it is more suited to the web (as opposed to enterprise
>>>>>> content management).
>>>>>>
>>>>>> -- Milind
>>>>>>
>>>>>>
>>>>>> On Thu, Jan 22, 2009 at 12:27 PM, Bruno Busco <br...@gmail.com>
>>>>>>
>>>>> wrote:
>>>
>>>> Hi Al,
>>>>>>> I do not want to hijack the thread but I think there is more interest
>>>>>>> in
>>>>>>> CMS
>>>>>>> than you could believe.
>>>>>>>
>>>>>>> There were also discussions on using OFBiz CMS to host the OFBiz Web
>>>>>>>
>>>>>> site
>>>
>>>> itself.
>>>>>>> This would be great and, may be, now that it seems you are back
>>>>>>> on-line,
>>>>>>>
>>>>>> we
>>>
>>>> could have better chance.
>>>>>>>
>>>>>>> Thank you,
>>>>>>> Bruno
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2009/1/22 Al Byers <by...@automationgroups.com>
>>>>>>>
>>>>>>>  Angelo,
>>>>>>>>
>>>>>>>> I implemented the CMS years ago per David's design. At the time, I
>>>>>>>>
>>>>>>> thought
>>>>>>>
>>>>>>>> it would be wise to have a single service, persistContentAndAssoc,
>>>>>>>>
>>>>>>> which
>>>
>>>> did
>>>>>>>> everything - creating and updating, all types of media and all
>>>>>>>> possible
>>>>>>>> repositories (ie. database, filesystem, etc). I am not convinced
>>>>>>>> that
>>>>>>>>
>>>>>>> it
>>>
>>>> would not be nice to have such a tool, even though it tends to go
>>>>>>>>
>>>>>>> against
>>>
>>>> the "OFBiz way" (I claim that for a T-shirt). I don't think
>>>>>>>> persistContentAndAssoc is that tool, though I would love someone to
>>>>>>>>
>>>>>>> improve
>>>>>>>
>>>>>>>> on it or simplify it.
>>>>>>>>
>>>>>>>> Not having a clear API for working with the CMS is its greatest
>>>>>>>>
>>>>>>> drawback,
>>>
>>>> I
>>>>>>>
>>>>>>>> think. Saner heads than mine have broken the persist process into
>>>>>>>>
>>>>>>> multiple
>>>>>>>
>>>>>>>> steps. I drew from what they have done and here is how I recently
>>>>>>>> did a
>>>>>>>> simple text persist:
>>>>>>>>             ...
>>>>>>>>             String localeString = (String)entry.getKey();
>>>>>>>>              String textData = (String)entry.getValue();
>>>>>>>>              // Create new content
>>>>>>>>              mapIn = new HashMap();
>>>>>>>>              mapIn.put("localeString", localeString);
>>>>>>>>              mapIn.put("objectInfo", textData);
>>>>>>>>              mapIn.put("userLogin", userLogin);
>>>>>>>>              mapIn.put("dataResourceTypeId", "SHORT_TEXT");
>>>>>>>>              mapIn.put("mimeTypeId", "text/plain");
>>>>>>>>              result = dispatcher.runSync("createDataResource",
>>>>>>>>
>>>>>>> mapIn);
>>>
>>>>              String dataResourceId =
>>>>>>>> (String)result.get("dataResourceId");
>>>>>>>>
>>>>>>>>              mapIn = new HashMap();
>>>>>>>>              mapIn.put("localeString", localeString);
>>>>>>>>              mapIn.put("textData", textData);
>>>>>>>>              mapIn.put("description", description);
>>>>>>>>              mapIn.put("userLogin", userLogin);
>>>>>>>>              mapIn.put("dataResourceId", dataResourceId);
>>>>>>>>              result = dispatcher.runSync("createContent", mapIn);
>>>>>>>>              String contentId = (String)result.get("contentId");
>>>>>>>>
>>>>>>>>
>>>>>>>>              // Create assoc to SurveyQuestionOption
>>>>>>>>              // Angelo, note that this is not the ContentAssoc
>>>>>>>> entity
>>>>>>>> that you would use.
>>>>>>>>              // I think you would just use the createContentAssoc
>>>>>>>>
>>>>>>> service
>>>>>>>
>>>>>>>> here instead
>>>>>>>>              // And I would use FastMaps because that is the OFBiz
>>>>>>>>
>>>>>>> way.
>>>
>>>>              mapIn = new HashMap();
>>>>>>>>              mapIn.put("localeString", localeString);
>>>>>>>>              mapIn.put("contentId", contentId);
>>>>>>>>              mapIn.put("surveyAnswerOptionId",
>>>>>>>> surveyAnswerOptionId);
>>>>>>>>              mapIn.put("userLogin", userLogin);
>>>>>>>>              Map result2 =
>>>>>>>> dispatcher.runSync("createSurveyAnswerOptionContentAssoc", mapIn);
>>>>>>>>
>>>>>>>> In my mind, that is still a lot of code, when there are only a few
>>>>>>>>
>>>>>>> pieces
>>>
>>>> of
>>>>>>>> data, but you might want to stick to something like this for now.
>>>>>>>>
>>>>>>>> Sorry I can't be of more help, but I have forgotten much of what I
>>>>>>>> did
>>>>>>>> before. With Hans taking an interest in CMS, maybe things will get
>>>>>>>> improved.
>>>>>>>>
>>>>>>>> -Al
>>>>>>>>
>>>>>>>> On Thu, Jan 22, 2009 at 12:00 PM, Angelo Matarazzo <
>>>>>>>> matarazzoangelo@gmail.com> wrote:
>>>>>>>>
>>>>>>>>  Hi,
>>>>>>>>> I am following the debate between Hans and David about Content
>>>>>>>>>
>>>>>>>> Component.
>>>>>>>
>>>>>>>> I am looking at a way to upload a resource and integrate it in
>>>>>>>>>
>>>>>>>> database.
>>>>>>>
>>>>>>>> In Content Component there is a java service: persistContentAndAssoc
>>>>>>>>>
>>>>>>>> which
>>>>>>>>
>>>>>>>>> is called very often.
>>>>>>>>> Instead in Party Component it seems that this service is  replaced
>>>>>>>>> by
>>>>>>>>> uploadPartyContentFile which don't call "persistContentAndAssoc"
>>>>>>>>> but
>>>>>>>>>
>>>>>>>> other
>>>>>>>>
>>>>>>>>> services.
>>>>>>>>> Why?
>>>>>>>>> To upload a file it is better to follow  Party Component?
>>>>>>>>> "persistContentAndAssoc" is been replaced in the system?
>>>>>>>>> Thank you.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> View this message in context:
>>>>>>>>> http://www.nabble.com/Content-Service-tp21610839p21610839.html
>>>>>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.6 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFJemWVrP3NbaWWqE4RAsigAJ4rGD5YqIdr3XLvQIFOUaHAjlmFNACfX75b
>> AEnl5fRRyStCdMp07kTPX7Y=
>> =IlTd
>> -----END PGP SIGNATURE-----
>>
>
>

Re: Content Service

Posted by BJ Freeman <bj...@free-man.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hard, as in you just can not plug in code, but have to walk through
application and make flow charts, then turn those into ofbiz.
and I agree that understanding ofbiz and what it has, is paramount.

don't forget, David, since your the architect and developer of ofbiz you
probably think it is easy to understand.
For someone that Database (using stored procedures),PHP, or Just Java OO
oriented, it is not the easy to get your mind around ofbiz.



David E Jones sent the following on 1/23/2009 8:28 PM:
> 
> Not that I think we should do that, but why would it be hard? It's just
> tables in a database, screens that read from and write to the data...
> 
> On the other hand, if anyone wants to research that I'd recommend
> researching the OFBiz stuff first so you can understand what it is like
> and what it supports. No sense replacing something that already takes
> care of your needs, even if you didn't know it.
> 
> -David
> 
> 
> On Jan 23, 2009, at 5:49 PM, BJ Freeman wrote:
> 
> Yup. The hard part is to work with in the confines of ofbiz framework.
> takes a lot of time to chart the flow of drupal then apply it to ofbiz.
> 
> Milind Parikh sent the following on 1/23/2009 4:05 PM:
>>>> I did not mean integration with an PHP based application. Just the
>>>> design
>>>> philosophy of the data structures and the concept of modules in
>>>> drupal (of
>>>> course, this is easier in a dynamically typed language like php).
>>>>
>>>> Regards
>>>> - Milind
>>>>
>>>>
>>>> On Fri, Jan 23, 2009 at 3:45 PM, BJ Freeman <bj...@free-man.net> wrote:
>>>>
>>>> the problem with integration of a PHP based application is it is a
>>>> completely separate application and coding style.
>>>>
>>>> Milind Parikh sent the following on 1/22/2009 12:34 PM:
>>>>>>> There is a lot of interest in CMS. I would suggest also looking at
>>>> Drupal's
>>>>>>> way of doing CMS (drupal,org) as I believe that it is very
>>>>>>> interesting
>>>> and
>>>>>>> flexible. However it is more suited to the web (as opposed to
>>>>>>> enterprise
>>>>>>> content management).
>>>>>>>
>>>>>>> -- Milind
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jan 22, 2009 at 12:27 PM, Bruno Busco <br...@gmail.com>
>>>> wrote:
>>>>>>>> Hi Al,
>>>>>>>> I do not want to hijack the thread but I think there is more
>>>>>>>> interest in
>>>>>>>> CMS
>>>>>>>> than you could believe.
>>>>>>>>
>>>>>>>> There were also discussions on using OFBiz CMS to host the OFBiz Web
>>>> site
>>>>>>>> itself.
>>>>>>>> This would be great and, may be, now that it seems you are back
>>>>>>>> on-line,
>>>> we
>>>>>>>> could have better chance.
>>>>>>>>
>>>>>>>> Thank you,
>>>>>>>> Bruno
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 2009/1/22 Al Byers <by...@automationgroups.com>
>>>>>>>>
>>>>>>>>> Angelo,
>>>>>>>>>
>>>>>>>>> I implemented the CMS years ago per David's design. At the time, I
>>>>>>>> thought
>>>>>>>>> it would be wise to have a single service, persistContentAndAssoc,
>>>> which
>>>>>>>>> did
>>>>>>>>> everything - creating and updating, all types of media and all
>>>>>>>>> possible
>>>>>>>>> repositories (ie. database, filesystem, etc). I am not convinced
>>>>>>>>> that
>>>> it
>>>>>>>>> would not be nice to have such a tool, even though it tends to go
>>>> against
>>>>>>>>> the "OFBiz way" (I claim that for a T-shirt). I don't think
>>>>>>>>> persistContentAndAssoc is that tool, though I would love someone to
>>>>>>>> improve
>>>>>>>>> on it or simplify it.
>>>>>>>>>
>>>>>>>>> Not having a clear API for working with the CMS is its greatest
>>>> drawback,
>>>>>>>> I
>>>>>>>>> think. Saner heads than mine have broken the persist process into
>>>>>>>> multiple
>>>>>>>>> steps. I drew from what they have done and here is how I
>>>>>>>>> recently did a
>>>>>>>>> simple text persist:
>>>>>>>>>              ...
>>>>>>>>>              String localeString = (String)entry.getKey();
>>>>>>>>>               String textData = (String)entry.getValue();
>>>>>>>>>               // Create new content
>>>>>>>>>               mapIn = new HashMap();
>>>>>>>>>               mapIn.put("localeString", localeString);
>>>>>>>>>               mapIn.put("objectInfo", textData);
>>>>>>>>>               mapIn.put("userLogin", userLogin);
>>>>>>>>>               mapIn.put("dataResourceTypeId", "SHORT_TEXT");
>>>>>>>>>               mapIn.put("mimeTypeId", "text/plain");
>>>>>>>>>               result = dispatcher.runSync("createDataResource",
>>>> mapIn);
>>>>>>>>>               String dataResourceId =
>>>>>>>>> (String)result.get("dataResourceId");
>>>>>>>>>
>>>>>>>>>               mapIn = new HashMap();
>>>>>>>>>               mapIn.put("localeString", localeString);
>>>>>>>>>               mapIn.put("textData", textData);
>>>>>>>>>               mapIn.put("description", description);
>>>>>>>>>               mapIn.put("userLogin", userLogin);
>>>>>>>>>               mapIn.put("dataResourceId", dataResourceId);
>>>>>>>>>               result = dispatcher.runSync("createContent", mapIn);
>>>>>>>>>               String contentId = (String)result.get("contentId");
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>               // Create assoc to SurveyQuestionOption
>>>>>>>>>               // Angelo, note that this is not the ContentAssoc
>>>>>>>>> entity
>>>>>>>>> that you would use.
>>>>>>>>>               // I think you would just use the createContentAssoc
>>>>>>>> service
>>>>>>>>> here instead
>>>>>>>>>               // And I would use FastMaps because that is the OFBiz
>>>> way.
>>>>>>>>>               mapIn = new HashMap();
>>>>>>>>>               mapIn.put("localeString", localeString);
>>>>>>>>>               mapIn.put("contentId", contentId);
>>>>>>>>>               mapIn.put("surveyAnswerOptionId",
>>>>>>>>> surveyAnswerOptionId);
>>>>>>>>>               mapIn.put("userLogin", userLogin);
>>>>>>>>>               Map result2 =
>>>>>>>>> dispatcher.runSync("createSurveyAnswerOptionContentAssoc", mapIn);
>>>>>>>>>
>>>>>>>>> In my mind, that is still a lot of code, when there are only a few
>>>> pieces
>>>>>>>>> of
>>>>>>>>> data, but you might want to stick to something like this for now.
>>>>>>>>>
>>>>>>>>> Sorry I can't be of more help, but I have forgotten much of what
>>>>>>>>> I did
>>>>>>>>> before. With Hans taking an interest in CMS, maybe things will get
>>>>>>>>> improved.
>>>>>>>>>
>>>>>>>>> -Al
>>>>>>>>>
>>>>>>>>> On Thu, Jan 22, 2009 at 12:00 PM, Angelo Matarazzo <
>>>>>>>>> matarazzoangelo@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>> I am following the debate between Hans and David about Content
>>>>>>>> Component.
>>>>>>>>>> I am looking at a way to upload a resource and integrate it in
>>>>>>>> database.
>>>>>>>>>> In Content Component there is a java service:
>>>>>>>>>> persistContentAndAssoc
>>>>>>>>> which
>>>>>>>>>> is called very often.
>>>>>>>>>> Instead in Party Component it seems that this service is 
>>>>>>>>>> replaced by
>>>>>>>>>> uploadPartyContentFile which don't call
>>>>>>>>>> "persistContentAndAssoc" but
>>>>>>>>> other
>>>>>>>>>> services.
>>>>>>>>>> Why?
>>>>>>>>>> To upload a file it is better to follow  Party Component?
>>>>>>>>>> "persistContentAndAssoc" is been replaced in the system?
>>>>>>>>>> Thank you.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> -- 
>>>>>>>>>> View this message in context:
>>>>>>>>>> http://www.nabble.com/Content-Service-tp21610839p21610839.html
>>>>>>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>>>>>>
>>>>>>>>>>
>>>>>
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJeudurP3NbaWWqE4RAnHfAKCCWwwRv4RnnFoohZNq5j1VdZE+eQCaA6NT
hzm+BTMZuziScLPTGxBfHWQ=
=8BpY
-----END PGP SIGNATURE-----

Re: Content Service

Posted by David E Jones <da...@hotwaxmedia.com>.
Not that I think we should do that, but why would it be hard? It's  
just tables in a database, screens that read from and write to the  
data...

On the other hand, if anyone wants to research that I'd recommend  
researching the OFBiz stuff first so you can understand what it is  
like and what it supports. No sense replacing something that already  
takes care of your needs, even if you didn't know it.

-David


On Jan 23, 2009, at 5:49 PM, BJ Freeman wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Yup. The hard part is to work with in the confines of ofbiz framework.
> takes a lot of time to chart the flow of drupal then apply it to  
> ofbiz.
>
> Milind Parikh sent the following on 1/23/2009 4:05 PM:
>> I did not mean integration with an PHP based application. Just the  
>> design
>> philosophy of the data structures and the concept of modules in  
>> drupal (of
>> course, this is easier in a dynamically typed language like php).
>>
>> Regards
>> - Milind
>>
>>
>> On Fri, Jan 23, 2009 at 3:45 PM, BJ Freeman <bj...@free-man.net>  
>> wrote:
>>
>> the problem with integration of a PHP based application is it is a
>> completely separate application and coding style.
>>
>> Milind Parikh sent the following on 1/22/2009 12:34 PM:
>>>>> There is a lot of interest in CMS. I would suggest also looking at
>> Drupal's
>>>>> way of doing CMS (drupal,org) as I believe that it is very  
>>>>> interesting
>> and
>>>>> flexible. However it is more suited to the web (as opposed to  
>>>>> enterprise
>>>>> content management).
>>>>>
>>>>> -- Milind
>>>>>
>>>>>
>>>>> On Thu, Jan 22, 2009 at 12:27 PM, Bruno Busco <bruno.busco@gmail.com 
>>>>> >
>> wrote:
>>>>>> Hi Al,
>>>>>> I do not want to hijack the thread but I think there is more  
>>>>>> interest in
>>>>>> CMS
>>>>>> than you could believe.
>>>>>>
>>>>>> There were also discussions on using OFBiz CMS to host the  
>>>>>> OFBiz Web
>> site
>>>>>> itself.
>>>>>> This would be great and, may be, now that it seems you are back  
>>>>>> on-line,
>> we
>>>>>> could have better chance.
>>>>>>
>>>>>> Thank you,
>>>>>> Bruno
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2009/1/22 Al Byers <by...@automationgroups.com>
>>>>>>
>>>>>>> Angelo,
>>>>>>>
>>>>>>> I implemented the CMS years ago per David's design. At the  
>>>>>>> time, I
>>>>>> thought
>>>>>>> it would be wise to have a single service,  
>>>>>>> persistContentAndAssoc,
>> which
>>>>>>> did
>>>>>>> everything - creating and updating, all types of media and all  
>>>>>>> possible
>>>>>>> repositories (ie. database, filesystem, etc). I am not  
>>>>>>> convinced that
>> it
>>>>>>> would not be nice to have such a tool, even though it tends to  
>>>>>>> go
>> against
>>>>>>> the "OFBiz way" (I claim that for a T-shirt). I don't think
>>>>>>> persistContentAndAssoc is that tool, though I would love  
>>>>>>> someone to
>>>>>> improve
>>>>>>> on it or simplify it.
>>>>>>>
>>>>>>> Not having a clear API for working with the CMS is its greatest
>> drawback,
>>>>>> I
>>>>>>> think. Saner heads than mine have broken the persist process  
>>>>>>> into
>>>>>> multiple
>>>>>>> steps. I drew from what they have done and here is how I  
>>>>>>> recently did a
>>>>>>> simple text persist:
>>>>>>>              ...
>>>>>>>              String localeString = (String)entry.getKey();
>>>>>>>               String textData = (String)entry.getValue();
>>>>>>>               // Create new content
>>>>>>>               mapIn = new HashMap();
>>>>>>>               mapIn.put("localeString", localeString);
>>>>>>>               mapIn.put("objectInfo", textData);
>>>>>>>               mapIn.put("userLogin", userLogin);
>>>>>>>               mapIn.put("dataResourceTypeId", "SHORT_TEXT");
>>>>>>>               mapIn.put("mimeTypeId", "text/plain");
>>>>>>>               result = dispatcher.runSync("createDataResource",
>> mapIn);
>>>>>>>               String dataResourceId =
>>>>>>> (String)result.get("dataResourceId");
>>>>>>>
>>>>>>>               mapIn = new HashMap();
>>>>>>>               mapIn.put("localeString", localeString);
>>>>>>>               mapIn.put("textData", textData);
>>>>>>>               mapIn.put("description", description);
>>>>>>>               mapIn.put("userLogin", userLogin);
>>>>>>>               mapIn.put("dataResourceId", dataResourceId);
>>>>>>>               result = dispatcher.runSync("createContent",  
>>>>>>> mapIn);
>>>>>>>               String contentId =  
>>>>>>> (String)result.get("contentId");
>>>>>>>
>>>>>>>
>>>>>>>               // Create assoc to SurveyQuestionOption
>>>>>>>               // Angelo, note that this is not the  
>>>>>>> ContentAssoc entity
>>>>>>> that you would use.
>>>>>>>               // I think you would just use the  
>>>>>>> createContentAssoc
>>>>>> service
>>>>>>> here instead
>>>>>>>               // And I would use FastMaps because that is the  
>>>>>>> OFBiz
>> way.
>>>>>>>               mapIn = new HashMap();
>>>>>>>               mapIn.put("localeString", localeString);
>>>>>>>               mapIn.put("contentId", contentId);
>>>>>>>               mapIn.put("surveyAnswerOptionId",  
>>>>>>> surveyAnswerOptionId);
>>>>>>>               mapIn.put("userLogin", userLogin);
>>>>>>>               Map result2 =
>>>>>>> dispatcher.runSync("createSurveyAnswerOptionContentAssoc",  
>>>>>>> mapIn);
>>>>>>>
>>>>>>> In my mind, that is still a lot of code, when there are only a  
>>>>>>> few
>> pieces
>>>>>>> of
>>>>>>> data, but you might want to stick to something like this for  
>>>>>>> now.
>>>>>>>
>>>>>>> Sorry I can't be of more help, but I have forgotten much of  
>>>>>>> what I did
>>>>>>> before. With Hans taking an interest in CMS, maybe things will  
>>>>>>> get
>>>>>>> improved.
>>>>>>>
>>>>>>> -Al
>>>>>>>
>>>>>>> On Thu, Jan 22, 2009 at 12:00 PM, Angelo Matarazzo <
>>>>>>> matarazzoangelo@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>> I am following the debate between Hans and David about Content
>>>>>> Component.
>>>>>>>> I am looking at a way to upload a resource and integrate it in
>>>>>> database.
>>>>>>>> In Content Component there is a java service:  
>>>>>>>> persistContentAndAssoc
>>>>>>> which
>>>>>>>> is called very often.
>>>>>>>> Instead in Party Component it seems that this service is   
>>>>>>>> replaced by
>>>>>>>> uploadPartyContentFile which don't call  
>>>>>>>> "persistContentAndAssoc" but
>>>>>>> other
>>>>>>>> services.
>>>>>>>> Why?
>>>>>>>> To upload a file it is better to follow  Party Component?
>>>>>>>> "persistContentAndAssoc" is been replaced in the system?
>>>>>>>> Thank you.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>> http://www.nabble.com/Content-Service-tp21610839p21610839.html
>>>>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFJemWVrP3NbaWWqE4RAsigAJ4rGD5YqIdr3XLvQIFOUaHAjlmFNACfX75b
> AEnl5fRRyStCdMp07kTPX7Y=
> =IlTd
> -----END PGP SIGNATURE-----


Re: Content Service

Posted by "Vince M. Clark" <vc...@globalera.com>.
How about integrating with Lenya? I've never used it so this is not an endorsement but it is an Apache project. 

----- Original Message ----- 
From: "BJ Freeman" <bj...@free-man.net> 
To: user@ofbiz.apache.org 
Sent: Friday, January 23, 2009 5:49:25 PM (GMT-0700) America/Denver 
Subject: Re: Content Service 

-----BEGIN PGP SIGNED MESSAGE----- 
Hash: SHA1 

Yup. The hard part is to work with in the confines of ofbiz framework. 
takes a lot of time to chart the flow of drupal then apply it to ofbiz. 

Milind Parikh sent the following on 1/23/2009 4:05 PM: 
> I did not mean integration with an PHP based application. Just the design 
> philosophy of the data structures and the concept of modules in drupal (of 
> course, this is easier in a dynamically typed language like php). 
> 
> Regards 
> - Milind 
> 
> 
> On Fri, Jan 23, 2009 at 3:45 PM, BJ Freeman <bj...@free-man.net> wrote: 
> 
> the problem with integration of a PHP based application is it is a 
> completely separate application and coding style. 
> 
> Milind Parikh sent the following on 1/22/2009 12:34 PM: 
>>>> There is a lot of interest in CMS. I would suggest also looking at 
> Drupal's 
>>>> way of doing CMS (drupal,org) as I believe that it is very interesting 
> and 
>>>> flexible. However it is more suited to the web (as opposed to enterprise 
>>>> content management). 
>>>> 
>>>> -- Milind 
>>>> 
>>>> 
>>>> On Thu, Jan 22, 2009 at 12:27 PM, Bruno Busco <br...@gmail.com> 
> wrote: 
>>>>> Hi Al, 
>>>>> I do not want to hijack the thread but I think there is more interest in 
>>>>> CMS 
>>>>> than you could believe. 
>>>>> 
>>>>> There were also discussions on using OFBiz CMS to host the OFBiz Web 
> site 
>>>>> itself. 
>>>>> This would be great and, may be, now that it seems you are back on-line, 
> we 
>>>>> could have better chance. 
>>>>> 
>>>>> Thank you, 
>>>>> Bruno 
>>>>> 
>>>>> 
>>>>> 
>>>>> 2009/1/22 Al Byers <by...@automationgroups.com> 
>>>>> 
>>>>>> Angelo, 
>>>>>> 
>>>>>> I implemented the CMS years ago per David's design. At the time, I 
>>>>> thought 
>>>>>> it would be wise to have a single service, persistContentAndAssoc, 
> which 
>>>>>> did 
>>>>>> everything - creating and updating, all types of media and all possible 
>>>>>> repositories (ie. database, filesystem, etc). I am not convinced that 
> it 
>>>>>> would not be nice to have such a tool, even though it tends to go 
> against 
>>>>>> the "OFBiz way" (I claim that for a T-shirt). I don't think 
>>>>>> persistContentAndAssoc is that tool, though I would love someone to 
>>>>> improve 
>>>>>> on it or simplify it. 
>>>>>> 
>>>>>> Not having a clear API for working with the CMS is its greatest 
> drawback, 
>>>>> I 
>>>>>> think. Saner heads than mine have broken the persist process into 
>>>>> multiple 
>>>>>> steps. I drew from what they have done and here is how I recently did a 
>>>>>> simple text persist: 
>>>>>> ... 
>>>>>> String localeString = (String)entry.getKey(); 
>>>>>> String textData = (String)entry.getValue(); 
>>>>>> // Create new content 
>>>>>> mapIn = new HashMap(); 
>>>>>> mapIn.put("localeString", localeString); 
>>>>>> mapIn.put("objectInfo", textData); 
>>>>>> mapIn.put("userLogin", userLogin); 
>>>>>> mapIn.put("dataResourceTypeId", "SHORT_TEXT"); 
>>>>>> mapIn.put("mimeTypeId", "text/plain"); 
>>>>>> result = dispatcher.runSync("createDataResource", 
> mapIn); 
>>>>>> String dataResourceId = 
>>>>>> (String)result.get("dataResourceId"); 
>>>>>> 
>>>>>> mapIn = new HashMap(); 
>>>>>> mapIn.put("localeString", localeString); 
>>>>>> mapIn.put("textData", textData); 
>>>>>> mapIn.put("description", description); 
>>>>>> mapIn.put("userLogin", userLogin); 
>>>>>> mapIn.put("dataResourceId", dataResourceId); 
>>>>>> result = dispatcher.runSync("createContent", mapIn); 
>>>>>> String contentId = (String)result.get("contentId"); 
>>>>>> 
>>>>>> 
>>>>>> // Create assoc to SurveyQuestionOption 
>>>>>> // Angelo, note that this is not the ContentAssoc entity 
>>>>>> that you would use. 
>>>>>> // I think you would just use the createContentAssoc 
>>>>> service 
>>>>>> here instead 
>>>>>> // And I would use FastMaps because that is the OFBiz 
> way. 
>>>>>> mapIn = new HashMap(); 
>>>>>> mapIn.put("localeString", localeString); 
>>>>>> mapIn.put("contentId", contentId); 
>>>>>> mapIn.put("surveyAnswerOptionId", surveyAnswerOptionId); 
>>>>>> mapIn.put("userLogin", userLogin); 
>>>>>> Map result2 = 
>>>>>> dispatcher.runSync("createSurveyAnswerOptionContentAssoc", mapIn); 
>>>>>> 
>>>>>> In my mind, that is still a lot of code, when there are only a few 
> pieces 
>>>>>> of 
>>>>>> data, but you might want to stick to something like this for now. 
>>>>>> 
>>>>>> Sorry I can't be of more help, but I have forgotten much of what I did 
>>>>>> before. With Hans taking an interest in CMS, maybe things will get 
>>>>>> improved. 
>>>>>> 
>>>>>> -Al 
>>>>>> 
>>>>>> On Thu, Jan 22, 2009 at 12:00 PM, Angelo Matarazzo < 
>>>>>> matarazzoangelo@gmail.com> wrote: 
>>>>>> 
>>>>>>> Hi, 
>>>>>>> I am following the debate between Hans and David about Content 
>>>>> Component. 
>>>>>>> I am looking at a way to upload a resource and integrate it in 
>>>>> database. 
>>>>>>> In Content Component there is a java service: persistContentAndAssoc 
>>>>>> which 
>>>>>>> is called very often. 
>>>>>>> Instead in Party Component it seems that this service is replaced by 
>>>>>>> uploadPartyContentFile which don't call "persistContentAndAssoc" but 
>>>>>> other 
>>>>>>> services. 
>>>>>>> Why? 
>>>>>>> To upload a file it is better to follow Party Component? 
>>>>>>> "persistContentAndAssoc" is been replaced in the system? 
>>>>>>> Thank you. 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> -- 
>>>>>>> View this message in context: 
>>>>>>> http://www.nabble.com/Content-Service-tp21610839p21610839.html 
>>>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com. 
>>>>>>> 
>>>>>>> 
>> 

-----BEGIN PGP SIGNATURE----- 
Version: GnuPG v1.4.6 (MingW32) 
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org 

iD8DBQFJemWVrP3NbaWWqE4RAsigAJ4rGD5YqIdr3XLvQIFOUaHAjlmFNACfX75b 
AEnl5fRRyStCdMp07kTPX7Y= 
=IlTd 
-----END PGP SIGNATURE----- 

Re: Content Service

Posted by BJ Freeman <bj...@free-man.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yup. The hard part is to work with in the confines of ofbiz framework.
takes a lot of time to chart the flow of drupal then apply it to ofbiz.

Milind Parikh sent the following on 1/23/2009 4:05 PM:
> I did not mean integration with an PHP based application. Just the design
> philosophy of the data structures and the concept of modules in drupal (of
> course, this is easier in a dynamically typed language like php).
> 
> Regards
> - Milind
> 
> 
> On Fri, Jan 23, 2009 at 3:45 PM, BJ Freeman <bj...@free-man.net> wrote:
> 
> the problem with integration of a PHP based application is it is a
> completely separate application and coding style.
> 
> Milind Parikh sent the following on 1/22/2009 12:34 PM:
>>>> There is a lot of interest in CMS. I would suggest also looking at
> Drupal's
>>>> way of doing CMS (drupal,org) as I believe that it is very interesting
> and
>>>> flexible. However it is more suited to the web (as opposed to enterprise
>>>> content management).
>>>>
>>>> -- Milind
>>>>
>>>>
>>>> On Thu, Jan 22, 2009 at 12:27 PM, Bruno Busco <br...@gmail.com>
> wrote:
>>>>> Hi Al,
>>>>> I do not want to hijack the thread but I think there is more interest in
>>>>> CMS
>>>>> than you could believe.
>>>>>
>>>>> There were also discussions on using OFBiz CMS to host the OFBiz Web
> site
>>>>> itself.
>>>>> This would be great and, may be, now that it seems you are back on-line,
> we
>>>>> could have better chance.
>>>>>
>>>>> Thank you,
>>>>> Bruno
>>>>>
>>>>>
>>>>>
>>>>> 2009/1/22 Al Byers <by...@automationgroups.com>
>>>>>
>>>>>> Angelo,
>>>>>>
>>>>>> I implemented the CMS years ago per David's design. At the time, I
>>>>> thought
>>>>>> it would be wise to have a single service, persistContentAndAssoc,
> which
>>>>>> did
>>>>>> everything - creating and updating, all types of media and all possible
>>>>>> repositories (ie. database, filesystem, etc). I am not convinced that
> it
>>>>>> would not be nice to have such a tool, even though it tends to go
> against
>>>>>> the "OFBiz way" (I claim that for a T-shirt). I don't think
>>>>>> persistContentAndAssoc is that tool, though I would love someone to
>>>>> improve
>>>>>> on it or simplify it.
>>>>>>
>>>>>> Not having a clear API for working with the CMS is its greatest
> drawback,
>>>>> I
>>>>>> think. Saner heads than mine have broken the persist process into
>>>>> multiple
>>>>>> steps. I drew from what they have done and here is how I recently did a
>>>>>> simple text persist:
>>>>>>               ...
>>>>>>               String localeString = (String)entry.getKey();
>>>>>>                String textData = (String)entry.getValue();
>>>>>>                // Create new content
>>>>>>                mapIn = new HashMap();
>>>>>>                mapIn.put("localeString", localeString);
>>>>>>                mapIn.put("objectInfo", textData);
>>>>>>                mapIn.put("userLogin", userLogin);
>>>>>>                mapIn.put("dataResourceTypeId", "SHORT_TEXT");
>>>>>>                mapIn.put("mimeTypeId", "text/plain");
>>>>>>                result = dispatcher.runSync("createDataResource",
> mapIn);
>>>>>>                String dataResourceId =
>>>>>> (String)result.get("dataResourceId");
>>>>>>
>>>>>>                mapIn = new HashMap();
>>>>>>                mapIn.put("localeString", localeString);
>>>>>>                mapIn.put("textData", textData);
>>>>>>                mapIn.put("description", description);
>>>>>>                mapIn.put("userLogin", userLogin);
>>>>>>                mapIn.put("dataResourceId", dataResourceId);
>>>>>>                result = dispatcher.runSync("createContent", mapIn);
>>>>>>                String contentId = (String)result.get("contentId");
>>>>>>
>>>>>>
>>>>>>                // Create assoc to SurveyQuestionOption
>>>>>>                // Angelo, note that this is not the ContentAssoc entity
>>>>>> that you would use.
>>>>>>                // I think you would just use the createContentAssoc
>>>>> service
>>>>>> here instead
>>>>>>                // And I would use FastMaps because that is the OFBiz
> way.
>>>>>>                mapIn = new HashMap();
>>>>>>                mapIn.put("localeString", localeString);
>>>>>>                mapIn.put("contentId", contentId);
>>>>>>                mapIn.put("surveyAnswerOptionId", surveyAnswerOptionId);
>>>>>>                mapIn.put("userLogin", userLogin);
>>>>>>                Map result2 =
>>>>>> dispatcher.runSync("createSurveyAnswerOptionContentAssoc", mapIn);
>>>>>>
>>>>>> In my mind, that is still a lot of code, when there are only a few
> pieces
>>>>>> of
>>>>>> data, but you might want to stick to something like this for now.
>>>>>>
>>>>>> Sorry I can't be of more help, but I have forgotten much of what I did
>>>>>> before. With Hans taking an interest in CMS, maybe things will get
>>>>>> improved.
>>>>>>
>>>>>> -Al
>>>>>>
>>>>>> On Thu, Jan 22, 2009 at 12:00 PM, Angelo Matarazzo <
>>>>>> matarazzoangelo@gmail.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>> I am following the debate between Hans and David about Content
>>>>> Component.
>>>>>>> I am looking at a way to upload a resource and integrate it in
>>>>> database.
>>>>>>> In Content Component there is a java service: persistContentAndAssoc
>>>>>>  which
>>>>>>> is called very often.
>>>>>>> Instead in Party Component it seems that this service is  replaced by
>>>>>>> uploadPartyContentFile which don't call "persistContentAndAssoc" but
>>>>>> other
>>>>>>> services.
>>>>>>> Why?
>>>>>>> To upload a file it is better to follow  Party Component?
>>>>>>> "persistContentAndAssoc" is been replaced in the system?
>>>>>>> Thank you.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://www.nabble.com/Content-Service-tp21610839p21610839.html
>>>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJemWVrP3NbaWWqE4RAsigAJ4rGD5YqIdr3XLvQIFOUaHAjlmFNACfX75b
AEnl5fRRyStCdMp07kTPX7Y=
=IlTd
-----END PGP SIGNATURE-----

Re: Content Service

Posted by Milind Parikh <mi...@gmail.com>.
I did not mean integration with an PHP based application. Just the design
philosophy of the data structures and the concept of modules in drupal (of
course, this is easier in a dynamically typed language like php).

Regards
- Milind


On Fri, Jan 23, 2009 at 3:45 PM, BJ Freeman <bj...@free-man.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> the problem with integration of a PHP based application is it is a
> completely separate application and coding style.
>
> Milind Parikh sent the following on 1/22/2009 12:34 PM:
> > There is a lot of interest in CMS. I would suggest also looking at
> Drupal's
> > way of doing CMS (drupal,org) as I believe that it is very interesting
> and
> > flexible. However it is more suited to the web (as opposed to enterprise
> > content management).
> >
> > -- Milind
> >
> >
> > On Thu, Jan 22, 2009 at 12:27 PM, Bruno Busco <br...@gmail.com>
> wrote:
> >
> >> Hi Al,
> >> I do not want to hijack the thread but I think there is more interest in
> >> CMS
> >> than you could believe.
> >>
> >> There were also discussions on using OFBiz CMS to host the OFBiz Web
> site
> >> itself.
> >> This would be great and, may be, now that it seems you are back on-line,
> we
> >> could have better chance.
> >>
> >> Thank you,
> >> Bruno
> >>
> >>
> >>
> >> 2009/1/22 Al Byers <by...@automationgroups.com>
> >>
> >>> Angelo,
> >>>
> >>> I implemented the CMS years ago per David's design. At the time, I
> >> thought
> >>> it would be wise to have a single service, persistContentAndAssoc,
> which
> >>> did
> >>> everything - creating and updating, all types of media and all possible
> >>> repositories (ie. database, filesystem, etc). I am not convinced that
> it
> >>> would not be nice to have such a tool, even though it tends to go
> against
> >>> the "OFBiz way" (I claim that for a T-shirt). I don't think
> >>> persistContentAndAssoc is that tool, though I would love someone to
> >> improve
> >>> on it or simplify it.
> >>>
> >>> Not having a clear API for working with the CMS is its greatest
> drawback,
> >> I
> >>> think. Saner heads than mine have broken the persist process into
> >> multiple
> >>> steps. I drew from what they have done and here is how I recently did a
> >>> simple text persist:
> >>>               ...
> >>>               String localeString = (String)entry.getKey();
> >>>                String textData = (String)entry.getValue();
> >>>                // Create new content
> >>>                mapIn = new HashMap();
> >>>                mapIn.put("localeString", localeString);
> >>>                mapIn.put("objectInfo", textData);
> >>>                mapIn.put("userLogin", userLogin);
> >>>                mapIn.put("dataResourceTypeId", "SHORT_TEXT");
> >>>                mapIn.put("mimeTypeId", "text/plain");
> >>>                result = dispatcher.runSync("createDataResource",
> mapIn);
> >>>                String dataResourceId =
> >>> (String)result.get("dataResourceId");
> >>>
> >>>                mapIn = new HashMap();
> >>>                mapIn.put("localeString", localeString);
> >>>                mapIn.put("textData", textData);
> >>>                mapIn.put("description", description);
> >>>                mapIn.put("userLogin", userLogin);
> >>>                mapIn.put("dataResourceId", dataResourceId);
> >>>                result = dispatcher.runSync("createContent", mapIn);
> >>>                String contentId = (String)result.get("contentId");
> >>>
> >>>
> >>>                // Create assoc to SurveyQuestionOption
> >>>                // Angelo, note that this is not the ContentAssoc entity
> >>> that you would use.
> >>>                // I think you would just use the createContentAssoc
> >> service
> >>> here instead
> >>>                // And I would use FastMaps because that is the OFBiz
> way.
> >>>                mapIn = new HashMap();
> >>>                mapIn.put("localeString", localeString);
> >>>                mapIn.put("contentId", contentId);
> >>>                mapIn.put("surveyAnswerOptionId", surveyAnswerOptionId);
> >>>                mapIn.put("userLogin", userLogin);
> >>>                Map result2 =
> >>> dispatcher.runSync("createSurveyAnswerOptionContentAssoc", mapIn);
> >>>
> >>> In my mind, that is still a lot of code, when there are only a few
> pieces
> >>> of
> >>> data, but you might want to stick to something like this for now.
> >>>
> >>> Sorry I can't be of more help, but I have forgotten much of what I did
> >>> before. With Hans taking an interest in CMS, maybe things will get
> >>> improved.
> >>>
> >>> -Al
> >>>
> >>> On Thu, Jan 22, 2009 at 12:00 PM, Angelo Matarazzo <
> >>> matarazzoangelo@gmail.com> wrote:
> >>>
> >>>> Hi,
> >>>> I am following the debate between Hans and David about Content
> >> Component.
> >>>> I am looking at a way to upload a resource and integrate it in
> >> database.
> >>>> In Content Component there is a java service: persistContentAndAssoc
> >>>  which
> >>>> is called very often.
> >>>> Instead in Party Component it seems that this service is  replaced by
> >>>> uploadPartyContentFile which don't call "persistContentAndAssoc" but
> >>> other
> >>>> services.
> >>>> Why?
> >>>> To upload a file it is better to follow  Party Component?
> >>>> "persistContentAndAssoc" is been replaced in the system?
> >>>> Thank you.
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> View this message in context:
> >>>> http://www.nabble.com/Content-Service-tp21610839p21610839.html
> >>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
> >>>>
> >>>>
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFJela0rP3NbaWWqE4RAqGjAKCoa4aNrQfLeU3Wdr8bhBsysRcCBwCfUDN+
> vVf6Zcie0BC4fdMgbxWgK3c=
> =WSZn
> -----END PGP SIGNATURE-----
>

Re: Content Service

Posted by BJ Freeman <bj...@free-man.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

the problem with integration of a PHP based application is it is a
completely separate application and coding style.

Milind Parikh sent the following on 1/22/2009 12:34 PM:
> There is a lot of interest in CMS. I would suggest also looking at Drupal's
> way of doing CMS (drupal,org) as I believe that it is very interesting and
> flexible. However it is more suited to the web (as opposed to enterprise
> content management).
> 
> -- Milind
> 
> 
> On Thu, Jan 22, 2009 at 12:27 PM, Bruno Busco <br...@gmail.com> wrote:
> 
>> Hi Al,
>> I do not want to hijack the thread but I think there is more interest in
>> CMS
>> than you could believe.
>>
>> There were also discussions on using OFBiz CMS to host the OFBiz Web site
>> itself.
>> This would be great and, may be, now that it seems you are back on-line, we
>> could have better chance.
>>
>> Thank you,
>> Bruno
>>
>>
>>
>> 2009/1/22 Al Byers <by...@automationgroups.com>
>>
>>> Angelo,
>>>
>>> I implemented the CMS years ago per David's design. At the time, I
>> thought
>>> it would be wise to have a single service, persistContentAndAssoc, which
>>> did
>>> everything - creating and updating, all types of media and all possible
>>> repositories (ie. database, filesystem, etc). I am not convinced that it
>>> would not be nice to have such a tool, even though it tends to go against
>>> the "OFBiz way" (I claim that for a T-shirt). I don't think
>>> persistContentAndAssoc is that tool, though I would love someone to
>> improve
>>> on it or simplify it.
>>>
>>> Not having a clear API for working with the CMS is its greatest drawback,
>> I
>>> think. Saner heads than mine have broken the persist process into
>> multiple
>>> steps. I drew from what they have done and here is how I recently did a
>>> simple text persist:
>>>               ...
>>>               String localeString = (String)entry.getKey();
>>>                String textData = (String)entry.getValue();
>>>                // Create new content
>>>                mapIn = new HashMap();
>>>                mapIn.put("localeString", localeString);
>>>                mapIn.put("objectInfo", textData);
>>>                mapIn.put("userLogin", userLogin);
>>>                mapIn.put("dataResourceTypeId", "SHORT_TEXT");
>>>                mapIn.put("mimeTypeId", "text/plain");
>>>                result = dispatcher.runSync("createDataResource", mapIn);
>>>                String dataResourceId =
>>> (String)result.get("dataResourceId");
>>>
>>>                mapIn = new HashMap();
>>>                mapIn.put("localeString", localeString);
>>>                mapIn.put("textData", textData);
>>>                mapIn.put("description", description);
>>>                mapIn.put("userLogin", userLogin);
>>>                mapIn.put("dataResourceId", dataResourceId);
>>>                result = dispatcher.runSync("createContent", mapIn);
>>>                String contentId = (String)result.get("contentId");
>>>
>>>
>>>                // Create assoc to SurveyQuestionOption
>>>                // Angelo, note that this is not the ContentAssoc entity
>>> that you would use.
>>>                // I think you would just use the createContentAssoc
>> service
>>> here instead
>>>                // And I would use FastMaps because that is the OFBiz way.
>>>                mapIn = new HashMap();
>>>                mapIn.put("localeString", localeString);
>>>                mapIn.put("contentId", contentId);
>>>                mapIn.put("surveyAnswerOptionId", surveyAnswerOptionId);
>>>                mapIn.put("userLogin", userLogin);
>>>                Map result2 =
>>> dispatcher.runSync("createSurveyAnswerOptionContentAssoc", mapIn);
>>>
>>> In my mind, that is still a lot of code, when there are only a few pieces
>>> of
>>> data, but you might want to stick to something like this for now.
>>>
>>> Sorry I can't be of more help, but I have forgotten much of what I did
>>> before. With Hans taking an interest in CMS, maybe things will get
>>> improved.
>>>
>>> -Al
>>>
>>> On Thu, Jan 22, 2009 at 12:00 PM, Angelo Matarazzo <
>>> matarazzoangelo@gmail.com> wrote:
>>>
>>>> Hi,
>>>> I am following the debate between Hans and David about Content
>> Component.
>>>> I am looking at a way to upload a resource and integrate it in
>> database.
>>>> In Content Component there is a java service: persistContentAndAssoc
>>>  which
>>>> is called very often.
>>>> Instead in Party Component it seems that this service is  replaced by
>>>> uploadPartyContentFile which don't call "persistContentAndAssoc" but
>>> other
>>>> services.
>>>> Why?
>>>> To upload a file it is better to follow  Party Component?
>>>> "persistContentAndAssoc" is been replaced in the system?
>>>> Thank you.
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Content-Service-tp21610839p21610839.html
>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>
>>>>
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJela0rP3NbaWWqE4RAqGjAKCoa4aNrQfLeU3Wdr8bhBsysRcCBwCfUDN+
vVf6Zcie0BC4fdMgbxWgK3c=
=WSZn
-----END PGP SIGNATURE-----

Re: Content Service

Posted by Milind Parikh <mi...@gmail.com>.
There is a lot of interest in CMS. I would suggest also looking at Drupal's
way of doing CMS (drupal,org) as I believe that it is very interesting and
flexible. However it is more suited to the web (as opposed to enterprise
content management).

-- Milind


On Thu, Jan 22, 2009 at 12:27 PM, Bruno Busco <br...@gmail.com> wrote:

> Hi Al,
> I do not want to hijack the thread but I think there is more interest in
> CMS
> than you could believe.
>
> There were also discussions on using OFBiz CMS to host the OFBiz Web site
> itself.
> This would be great and, may be, now that it seems you are back on-line, we
> could have better chance.
>
> Thank you,
> Bruno
>
>
>
> 2009/1/22 Al Byers <by...@automationgroups.com>
>
> > Angelo,
> >
> > I implemented the CMS years ago per David's design. At the time, I
> thought
> > it would be wise to have a single service, persistContentAndAssoc, which
> > did
> > everything - creating and updating, all types of media and all possible
> > repositories (ie. database, filesystem, etc). I am not convinced that it
> > would not be nice to have such a tool, even though it tends to go against
> > the "OFBiz way" (I claim that for a T-shirt). I don't think
> > persistContentAndAssoc is that tool, though I would love someone to
> improve
> > on it or simplify it.
> >
> > Not having a clear API for working with the CMS is its greatest drawback,
> I
> > think. Saner heads than mine have broken the persist process into
> multiple
> > steps. I drew from what they have done and here is how I recently did a
> > simple text persist:
> >               ...
> >               String localeString = (String)entry.getKey();
> >                String textData = (String)entry.getValue();
> >                // Create new content
> >                mapIn = new HashMap();
> >                mapIn.put("localeString", localeString);
> >                mapIn.put("objectInfo", textData);
> >                mapIn.put("userLogin", userLogin);
> >                mapIn.put("dataResourceTypeId", "SHORT_TEXT");
> >                mapIn.put("mimeTypeId", "text/plain");
> >                result = dispatcher.runSync("createDataResource", mapIn);
> >                String dataResourceId =
> > (String)result.get("dataResourceId");
> >
> >                mapIn = new HashMap();
> >                mapIn.put("localeString", localeString);
> >                mapIn.put("textData", textData);
> >                mapIn.put("description", description);
> >                mapIn.put("userLogin", userLogin);
> >                mapIn.put("dataResourceId", dataResourceId);
> >                result = dispatcher.runSync("createContent", mapIn);
> >                String contentId = (String)result.get("contentId");
> >
> >
> >                // Create assoc to SurveyQuestionOption
> >                // Angelo, note that this is not the ContentAssoc entity
> > that you would use.
> >                // I think you would just use the createContentAssoc
> service
> > here instead
> >                // And I would use FastMaps because that is the OFBiz way.
> >                mapIn = new HashMap();
> >                mapIn.put("localeString", localeString);
> >                mapIn.put("contentId", contentId);
> >                mapIn.put("surveyAnswerOptionId", surveyAnswerOptionId);
> >                mapIn.put("userLogin", userLogin);
> >                Map result2 =
> > dispatcher.runSync("createSurveyAnswerOptionContentAssoc", mapIn);
> >
> > In my mind, that is still a lot of code, when there are only a few pieces
> > of
> > data, but you might want to stick to something like this for now.
> >
> > Sorry I can't be of more help, but I have forgotten much of what I did
> > before. With Hans taking an interest in CMS, maybe things will get
> > improved.
> >
> > -Al
> >
> > On Thu, Jan 22, 2009 at 12:00 PM, Angelo Matarazzo <
> > matarazzoangelo@gmail.com> wrote:
> >
> > >
> > > Hi,
> > > I am following the debate between Hans and David about Content
> Component.
> > > I am looking at a way to upload a resource and integrate it in
> database.
> > > In Content Component there is a java service: persistContentAndAssoc
> >  which
> > > is called very often.
> > > Instead in Party Component it seems that this service is  replaced by
> > > uploadPartyContentFile which don't call "persistContentAndAssoc" but
> > other
> > > services.
> > > Why?
> > > To upload a file it is better to follow  Party Component?
> > > "persistContentAndAssoc" is been replaced in the system?
> > > Thank you.
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > > http://www.nabble.com/Content-Service-tp21610839p21610839.html
> > > Sent from the OFBiz - User mailing list archive at Nabble.com.
> > >
> > >
> >
>

Re: Content Service

Posted by Bruno Busco <br...@gmail.com>.
Hi Al,
I do not want to hijack the thread but I think there is more interest in CMS
than you could believe.

There were also discussions on using OFBiz CMS to host the OFBiz Web site
itself.
This would be great and, may be, now that it seems you are back on-line, we
could have better chance.

Thank you,
Bruno



2009/1/22 Al Byers <by...@automationgroups.com>

> Angelo,
>
> I implemented the CMS years ago per David's design. At the time, I thought
> it would be wise to have a single service, persistContentAndAssoc, which
> did
> everything - creating and updating, all types of media and all possible
> repositories (ie. database, filesystem, etc). I am not convinced that it
> would not be nice to have such a tool, even though it tends to go against
> the "OFBiz way" (I claim that for a T-shirt). I don't think
> persistContentAndAssoc is that tool, though I would love someone to improve
> on it or simplify it.
>
> Not having a clear API for working with the CMS is its greatest drawback, I
> think. Saner heads than mine have broken the persist process into multiple
> steps. I drew from what they have done and here is how I recently did a
> simple text persist:
>               ...
>               String localeString = (String)entry.getKey();
>                String textData = (String)entry.getValue();
>                // Create new content
>                mapIn = new HashMap();
>                mapIn.put("localeString", localeString);
>                mapIn.put("objectInfo", textData);
>                mapIn.put("userLogin", userLogin);
>                mapIn.put("dataResourceTypeId", "SHORT_TEXT");
>                mapIn.put("mimeTypeId", "text/plain");
>                result = dispatcher.runSync("createDataResource", mapIn);
>                String dataResourceId =
> (String)result.get("dataResourceId");
>
>                mapIn = new HashMap();
>                mapIn.put("localeString", localeString);
>                mapIn.put("textData", textData);
>                mapIn.put("description", description);
>                mapIn.put("userLogin", userLogin);
>                mapIn.put("dataResourceId", dataResourceId);
>                result = dispatcher.runSync("createContent", mapIn);
>                String contentId = (String)result.get("contentId");
>
>
>                // Create assoc to SurveyQuestionOption
>                // Angelo, note that this is not the ContentAssoc entity
> that you would use.
>                // I think you would just use the createContentAssoc service
> here instead
>                // And I would use FastMaps because that is the OFBiz way.
>                mapIn = new HashMap();
>                mapIn.put("localeString", localeString);
>                mapIn.put("contentId", contentId);
>                mapIn.put("surveyAnswerOptionId", surveyAnswerOptionId);
>                mapIn.put("userLogin", userLogin);
>                Map result2 =
> dispatcher.runSync("createSurveyAnswerOptionContentAssoc", mapIn);
>
> In my mind, that is still a lot of code, when there are only a few pieces
> of
> data, but you might want to stick to something like this for now.
>
> Sorry I can't be of more help, but I have forgotten much of what I did
> before. With Hans taking an interest in CMS, maybe things will get
> improved.
>
> -Al
>
> On Thu, Jan 22, 2009 at 12:00 PM, Angelo Matarazzo <
> matarazzoangelo@gmail.com> wrote:
>
> >
> > Hi,
> > I am following the debate between Hans and David about Content Component.
> > I am looking at a way to upload a resource and integrate it in database.
> > In Content Component there is a java service: persistContentAndAssoc
>  which
> > is called very often.
> > Instead in Party Component it seems that this service is  replaced by
> > uploadPartyContentFile which don't call "persistContentAndAssoc" but
> other
> > services.
> > Why?
> > To upload a file it is better to follow  Party Component?
> > "persistContentAndAssoc" is been replaced in the system?
> > Thank you.
> >
> >
> >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Content-Service-tp21610839p21610839.html
> > Sent from the OFBiz - User mailing list archive at Nabble.com.
> >
> >
>

Re: Content Service

Posted by Angelo Matarazzo <ma...@gmail.com>.
Hi Al,
forgive my delay in answering.
thank you for your explanation but why are you not convinced about "single
service"?
However I'm going to test and study your service deeply.

What do you think about partyContent solution which uses "simple" service?
Thank you again.




byersa wrote:
> 
> Angelo,
> 
> I implemented the CMS years ago per David's design. At the time, I thought
> it would be wise to have a single service, persistContentAndAssoc, which
> did
> everything - creating and updating, all types of media and all possible
> repositories (ie. database, filesystem, etc). I am not convinced that it
> would not be nice to have such a tool, even though it tends to go against
> the "OFBiz way" (I claim that for a T-shirt). I don't think
> persistContentAndAssoc is that tool, though I would love someone to
> improve
> on it or simplify it.
> 
> Not having a clear API for working with the CMS is its greatest drawback,
> I
> think. Saner heads than mine have broken the persist process into multiple
> steps. I drew from what they have done and here is how I recently did a
> simple text persist:
>                ...
>                String localeString = (String)entry.getKey();
>                 String textData = (String)entry.getValue();
>                 // Create new content
>                 mapIn = new HashMap();
>                 mapIn.put("localeString", localeString);
>                 mapIn.put("objectInfo", textData);
>                 mapIn.put("userLogin", userLogin);
>                 mapIn.put("dataResourceTypeId", "SHORT_TEXT");
>                 mapIn.put("mimeTypeId", "text/plain");
>                 result = dispatcher.runSync("createDataResource", mapIn);
>                 String dataResourceId =
> (String)result.get("dataResourceId");
> 
>                 mapIn = new HashMap();
>                 mapIn.put("localeString", localeString);
>                 mapIn.put("textData", textData);
>                 mapIn.put("description", description);
>                 mapIn.put("userLogin", userLogin);
>                 mapIn.put("dataResourceId", dataResourceId);
>                 result = dispatcher.runSync("createContent", mapIn);
>                 String contentId = (String)result.get("contentId");
> 
> 
>                 // Create assoc to SurveyQuestionOption
>                 // Angelo, note that this is not the ContentAssoc entity
> that you would use.
>                 // I think you would just use the createContentAssoc
> service
> here instead
>                 // And I would use FastMaps because that is the OFBiz way.
>                 mapIn = new HashMap();
>                 mapIn.put("localeString", localeString);
>                 mapIn.put("contentId", contentId);
>                 mapIn.put("surveyAnswerOptionId", surveyAnswerOptionId);
>                 mapIn.put("userLogin", userLogin);
>                 Map result2 =
> dispatcher.runSync("createSurveyAnswerOptionContentAssoc", mapIn);
> 
> In my mind, that is still a lot of code, when there are only a few pieces
> of
> data, but you might want to stick to something like this for now.
> 
> Sorry I can't be of more help, but I have forgotten much of what I did
> before. With Hans taking an interest in CMS, maybe things will get
> improved.
> 
> -Al
> 
> On Thu, Jan 22, 2009 at 12:00 PM, Angelo Matarazzo <
> matarazzoangelo@gmail.com> wrote:
> 
>>
>> Hi,
>> I am following the debate between Hans and David about Content Component.
>> I am looking at a way to upload a resource and integrate it in database.
>> In Content Component there is a java service: persistContentAndAssoc 
>> which
>> is called very often.
>> Instead in Party Component it seems that this service is  replaced by
>> uploadPartyContentFile which don't call "persistContentAndAssoc" but
>> other
>> services.
>> Why?
>> To upload a file it is better to follow  Party Component?
>> "persistContentAndAssoc" is been replaced in the system?
>> Thank you.
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Content-Service-tp21610839p21610839.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Content-Service-tp21610839p21656132.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Content Service

Posted by Al Byers <by...@automationgroups.com>.
Angelo,

I implemented the CMS years ago per David's design. At the time, I thought
it would be wise to have a single service, persistContentAndAssoc, which did
everything - creating and updating, all types of media and all possible
repositories (ie. database, filesystem, etc). I am not convinced that it
would not be nice to have such a tool, even though it tends to go against
the "OFBiz way" (I claim that for a T-shirt). I don't think
persistContentAndAssoc is that tool, though I would love someone to improve
on it or simplify it.

Not having a clear API for working with the CMS is its greatest drawback, I
think. Saner heads than mine have broken the persist process into multiple
steps. I drew from what they have done and here is how I recently did a
simple text persist:
               ...
               String localeString = (String)entry.getKey();
                String textData = (String)entry.getValue();
                // Create new content
                mapIn = new HashMap();
                mapIn.put("localeString", localeString);
                mapIn.put("objectInfo", textData);
                mapIn.put("userLogin", userLogin);
                mapIn.put("dataResourceTypeId", "SHORT_TEXT");
                mapIn.put("mimeTypeId", "text/plain");
                result = dispatcher.runSync("createDataResource", mapIn);
                String dataResourceId =
(String)result.get("dataResourceId");

                mapIn = new HashMap();
                mapIn.put("localeString", localeString);
                mapIn.put("textData", textData);
                mapIn.put("description", description);
                mapIn.put("userLogin", userLogin);
                mapIn.put("dataResourceId", dataResourceId);
                result = dispatcher.runSync("createContent", mapIn);
                String contentId = (String)result.get("contentId");


                // Create assoc to SurveyQuestionOption
                // Angelo, note that this is not the ContentAssoc entity
that you would use.
                // I think you would just use the createContentAssoc service
here instead
                // And I would use FastMaps because that is the OFBiz way.
                mapIn = new HashMap();
                mapIn.put("localeString", localeString);
                mapIn.put("contentId", contentId);
                mapIn.put("surveyAnswerOptionId", surveyAnswerOptionId);
                mapIn.put("userLogin", userLogin);
                Map result2 =
dispatcher.runSync("createSurveyAnswerOptionContentAssoc", mapIn);

In my mind, that is still a lot of code, when there are only a few pieces of
data, but you might want to stick to something like this for now.

Sorry I can't be of more help, but I have forgotten much of what I did
before. With Hans taking an interest in CMS, maybe things will get improved.

-Al

On Thu, Jan 22, 2009 at 12:00 PM, Angelo Matarazzo <
matarazzoangelo@gmail.com> wrote:

>
> Hi,
> I am following the debate between Hans and David about Content Component.
> I am looking at a way to upload a resource and integrate it in database.
> In Content Component there is a java service: persistContentAndAssoc  which
> is called very often.
> Instead in Party Component it seems that this service is  replaced by
> uploadPartyContentFile which don't call "persistContentAndAssoc" but other
> services.
> Why?
> To upload a file it is better to follow  Party Component?
> "persistContentAndAssoc" is been replaced in the system?
> Thank you.
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Content-Service-tp21610839p21610839.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>