Hi,
For now I implemented as Chris suggested - this way I did not have to
change the API, and keep the logic inside the service. The API will need to
be changed anyway at one point - it currently return a String for the whole
csv export, it would be better to return a Stream.
Thomas


On Tue, Apr 26, 2016 at 3:47 PM Thomas Draier <tdra...@jahia.com> wrote:

> Yes, that also make sense, at least for the "what" to export - however i
> still find it strange that the service does the format (csv), which is for
> me more the responsibility of the endpoint. Anyway, adding a wire from
> profile to segments service is possible and simpler - I thought we already
> had the opposite dependency, but actually profile service is not injected
> any other base service.
>
>
> On Tue, Apr 26, 2016 at 2:50 PM Christophe Laprun <clap...@jahia.com>
> wrote:
>
>> Hi,
>>
>> > On 26 Apr 2016, at 10:54, Thomas Draier <tdra...@jahia.com> wrote:
>> >
>> > In order to solve https://issues.apache.org/jira/browse/UNOMI-25 , I
>> need
>> > to have access to segments service, which is not available in profile
>> > service. Also in my opinion the CSV export has nothing to do in
>> low-level
>> > service like profile - I would rather move the
>> > exportProfilesPropertiesToCsv method to the REST endpoint and remove it
>> > from the service API. What do you think ?
>>
>> Architecturally speaking, it doesn’t seem appropriate to put the code
>> into the endpoint since it would expose too many low-level details to the
>> endpoint. Also, exporting really seems appropriate for the profile service
>> since it should be responsible for knowing the details of what needs to be
>> exported in profiles and how that exported data should be laid out. Can’t
>> we just wire the profile service to access the segments service?
>>
>> Cheers,
>> Christophe Laprun
>> Senior Software Engineer
>>
>> 8 rue du Sentier | 75002 Paris | France
>> jahia.com <http://www.jahia.com/>
>> SKYPE <skype:chris.laprun?add> | LINKEDIN <
>> https://www.linkedin.com/in/chrislaprun> | TWITTER <
>> https://twitter.com/metacosm> | VCARD <
>> http://www.jahia.com/vcard/LaprunChristophe.vcf>
>>
>> > JOIN OUR COMMUNITY <http://www.jahia.com/> to evaluate, get trained
>> and to discover why Jahia is a leading User Experience Platform (UXP) for
>> Digital Transformation.
>>
>>

Reply via email to