You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by Serge Huber <sh...@jahia.com.INVALID> on 2022/05/03 09:55:34 UTC

Re: Allow deserialization of profile in CustomObjectMapper

Hello Adrien,

I just checked and the deserialization is setup for the profile item type,
for "top level" item types, but maybe it is missing a mapping for the event
source and target properties. This is something that needs checking.

If you want to contribute that would be fantastic. I think it would be good
to look at the
https://github.com/apache/unomi/blob/64281306c770c710ec737f64ece7332f54e91cd5/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PropertyTypedObjectDeserializer.java#L53
object to see if it can work with sub-objects and if it can to see how we
could do a generic mapping system for event objects.

Regards,
  Serge Huber.
Serge Huber
CTO & Co-Founder
T +41 22 361 3424
9 route des Jeunes | 1227 Acacias | Switzerland
jahia.com <http://www.jahia.com/>
SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
<https://twitter.com/sergehuber> | VCARD
<http://www.jahia.com/vcard/HuberSerge.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.


On Thu, Apr 28, 2022 at 4:25 PM OLIVA Adrien <ao...@sefas.com> wrote:

> Hi,
>
> I found a "bug" in Unomi while doing some test.
> When a profile object is stored as event's target or source, Jackson
> failed to deserialize item while getting such events (through POST
> /cxs/events/search for instance).
>
> It appears that Profile deserializer is missing in CustomObjectMapper used
> in Unomi.
>
> How can I contribute to fix this issue.
>
> Regards.
>
>
>
> Adrien Oliva
> Ingénieur Logiciel
>
>                 ≡
>      S E F A S
> UNE MARQUE DE DOCAPOSTE
>
> 6 rue de l’étang - 90000 Belfort
> E-mail : aoliva@sefas.com
> www.sefasinnovation.fr - www.docaposte.com
>
>
> Sefas est une marque de Docaposte, filiale du Groupe La Poste.
> Adoptez l’éco-attitude : n’imprimez que si cela vous semble
> nécessaire.
> Si vous recevez ce mail en dehors de vos heures de travail ou
> pendant vos congés, vous n’avez pas à y répondre immédiatement,
> sauf en cas d'urgence exceptionnelle.
>
>

Re: Allow deserialization of profile in CustomObjectMapper

Posted by Serge Huber <sh...@jahia.com.INVALID>.
Ok, I think you could probably achieve what you need using a custom event
type and an associated rule that would copy whatever data you need into
whatever object you want.

You can find example of this here:
https://unomi.apache.org/manual/1_6_x/index.html#_how_to_update_a_profile_from_the_public_internet

Best regards,
  Serge...
Serge Huber
CTO & Co-Founder
T +41 22 361 3424
9 route des Jeunes | 1227 Acacias | Switzerland
jahia.com <http://www.jahia.com/>
SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
<https://twitter.com/sergehuber> | VCARD
<http://www.jahia.com/vcard/HuberSerge.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.


On Mon, May 9, 2022 at 3:40 PM OLIVA Adrien <ao...@sefas.com> wrote:

> Hi,
>
> We are trying to build a plugin which aims to "convert" Unomi behaviour
> from Customer Data Platform to a kind of Document Data Platform. In our
> use, a "profile" can be a document.
> For instance, on a delivery failure, an event with document (i.e. profile)
> as source is generated. And I need to retrieve this kind of events…
>
> Regards.
> ________________________________
> De : Serge Huber <sh...@jahia.com.INVALID>
> Envoyé : lundi 9 mai 2022 14:51
> À : dev@unomi.apache.org <de...@unomi.apache.org>
> Objet : Re: Allow deserialization of profile in CustomObjectMapper
>
> Hello Adrien,
>
> After some thinking this might be problematic in terms of security. In
> Unomi 2 we have a new system to protect the data that allows these types to
> be used.
>
> Could you explain what you are trying to do because there are surely
> alternative ways to do it ?
>
> Best regards,
>   Serge
>
> Serge Huber
> CTO & Co-Founder
> T +41 22 361 3424
> 9 route des Jeunes | 1227 Acacias | Switzerland
> jahia.com <http://www.jahia.com/>
> SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> <https://twitter.com/sergehuber> | VCARD
> <http://www.jahia.com/vcard/HuberSerge.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.
>
>
> On Tue, May 3, 2022 at 2:51 PM OLIVA Adrien <ao...@sefas.com> wrote:
>
> > Hello Serge,
> >
> > Great, I created it so! Both Jira ticket and pull request.
> >
> > Regards.
> > ________________________________
> > De : Serge Huber <sh...@jahia.com.INVALID>
> > Envoyé : mardi 3 mai 2022 14:20
> > À : dev@unomi.apache.org <de...@unomi.apache.org>
> > Objet : Re: Allow deserialization of profile in CustomObjectMapper
> >
> > Hello Adrian,
> >
> > You are still welcome to create a PR for your patch, we might even merge
> it
> > but I can't guarantee it will be released soon :)
> >
> > Regards,
> >   Serge...
> > Serge Huber
> > CTO & Co-Founder
> > T +41 22 361 3424
> > 9 route des Jeunes | 1227 Acacias | Switzerland
> > jahia.com <http://www.jahia.com/>
> > SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> > <https://twitter.com/sergehuber> | VCARD
> > <http://www.jahia.com/vcard/HuberSerge.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.
> >
> >
> > On Tue, May 3, 2022 at 2:19 PM OLIVA Adrien <ao...@sefas.com> wrote:
> >
> > > Ok, I understand now!
> > > I will keep my patch with 1.6.0 and I'll go upstream with newer version
> > > once it will be released!
> > >
> > > Thank you very much.
> > >
> > > Regards.
> > > ________________________________
> > > De : Serge Huber <sh...@jahia.com.INVALID>
> > > Envoyé : mardi 3 mai 2022 14:11
> > > À : dev@unomi.apache.org <de...@unomi.apache.org>
> > > Objet : Re: Allow deserialization of profile in CustomObjectMapper
> > >
> > > Hello Adrian,
> > >
> > > I think I understand the problem, I was looking at the source code on
> the
> > > master branch that has a lot more registered classes in the
> > > CustomObjectMapper, while you are looking at the 1.6 branch
> > >
> > > We are currently hard at work on the Unomi 2 branch.
> > >
> > > For the UNOMI-XXX it's simply a matter of creating a ticket in the
> Unomi
> > > issue tracker here:
> > https://issues.apache.org/jira/projects/UNOMI/summary
> > >
> > > I think it might be better to backport the changes from the master to
> the
> > > Unomi 1.6 but at the same time we have no immediate plans for a 1.6.1
> > > release and are instead focusing on a 2.0 as much as possible.
> > >
> > > Regards,
> > >   Serge...
> > >
> > > Serge Huber
> > > CTO & Co-Founder
> > > T +41 22 361 3424
> > > 9 route des Jeunes | 1227 Acacias | Switzerland
> > > jahia.com <http://www.jahia.com/>
> > > SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> > > <https://twitter.com/sergehuber> | VCARD
> > > <http://www.jahia.com/vcard/HuberSerge.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.
> > >
> > >
> > > On Tue, May 3, 2022 at 12:34 PM OLIVA Adrien <ao...@sefas.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > In fact, I already look at persistence/spi package, made a patch for
> > > > myself that seems to work well in my case! (I double check and I
> really
> > > > have "profile" in itemType field).
> > > >
> > > > I wanted to create a pull-request on your Github with my patch, but
> it
> > > ask
> > > > fro a UNOMI-XXXX tag and recommend to ask on dev mailing list! That's
> > > what
> > > > I do!!!
> > > >
> > > > I attach my patch to this email. As you can see, it seems that
> > > > CustomObjectMapper register many kind of item types, except Profile.
> > > >
> > > > But if you recommend to look at PropertyTypedObjectDeserializer to
> > find a
> > > > "cleaner" solution, I can try to figure it out.
> > > >
> > > > Regards.
> > > > ------------------------------
> > > > *De :* Serge Huber <sh...@jahia.com.INVALID>
> > > > *Envoyé :* mardi 3 mai 2022 11:55
> > > > *À :* dev@unomi.apache.org <de...@unomi.apache.org>
> > > > *Objet :* Re: Allow deserialization of profile in CustomObjectMapper
> > > >
> > > > Hello Adrien,
> > > >
> > > > I just checked and the deserialization is setup for the profile item
> > > type,
> > > > for "top level" item types, but maybe it is missing a mapping for the
> > > event
> > > > source and target properties. This is something that needs checking.
> > > >
> > > > If you want to contribute that would be fantastic. I think it would
> be
> > > good
> > > > to look at the
> > > >
> > > >
> > >
> >
> https://github.com/apache/unomi/blob/64281306c770c710ec737f64ece7332f54e91cd5/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PropertyTypedObjectDeserializer.java#L53
> > > > object to see if it can work with sub-objects and if it can to see
> how
> > we
> > > > could do a generic mapping system for event objects.
> > > >
> > > > Regards,
> > > >   Serge Huber.
> > > > Serge Huber
> > > > CTO & Co-Founder
> > > > T +41 22 361 3424
> > > > 9 route des Jeunes | 1227 Acacias | Switzerland
> > > > jahia.com <http://www.jahia.com/>
> > > > SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> > > > <https://twitter.com/sergehuber> | VCARD
> > > > <http://www.jahia.com/vcard/HuberSerge.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.
> > > >
> > > >
> > > > On Thu, Apr 28, 2022 at 4:25 PM OLIVA Adrien <ao...@sefas.com>
> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I found a "bug" in Unomi while doing some test.
> > > > > When a profile object is stored as event's target or source,
> Jackson
> > > > > failed to deserialize item while getting such events (through POST
> > > > > /cxs/events/search for instance).
> > > > >
> > > > > It appears that Profile deserializer is missing in
> CustomObjectMapper
> > > > used
> > > > > in Unomi.
> > > > >
> > > > > How can I contribute to fix this issue.
> > > > >
> > > > > Regards.
> > > > >
> > > > >
> > > > >
> > > > > Adrien Oliva
> > > > > Ingénieur Logiciel
> > > > >
> > > > >                 ≡
> > > > >      S E F A S
> > > > > UNE MARQUE DE DOCAPOSTE
> > > > >
> > > > > 6 rue de l’étang - 90000 Belfort
> > > > > E-mail : aoliva@sefas.com
> > > > > www.sefasinnovation.fr<http://www.sefasinnovation.fr><<
> http://www.sefasinnovation.fr<http://www.sefasinnovation.fr><>
> > http://www.sefasinnovation.fr<http://www.sefasinnovation.fr>> -
> > > www.docaposte.com<http://www.docaposte.com>
> > > > >
> > > > >
> > > > > Sefas est une marque de Docaposte, filiale du Groupe La Poste.
> > > > > Adoptez l’éco-attitude : n’imprimez que si cela vous semble
> > > > > nécessaire.
> > > > > Si vous recevez ce mail en dehors de vos heures de travail ou
> > > > > pendant vos congés, vous n’avez pas à y répondre immédiatement,
> > > > > sauf en cas d'urgence exceptionnelle.
> > > > >
> > > > >
> > > >
> > >
> >
>

RE: Allow deserialization of profile in CustomObjectMapper

Posted by OLIVA Adrien <ao...@sefas.com>.
Hi,

We are trying to build a plugin which aims to "convert" Unomi behaviour from Customer Data Platform to a kind of Document Data Platform. In our use, a "profile" can be a document.
For instance, on a delivery failure, an event with document (i.e. profile) as source is generated. And I need to retrieve this kind of events…

Regards.
________________________________
De : Serge Huber <sh...@jahia.com.INVALID>
Envoyé : lundi 9 mai 2022 14:51
À : dev@unomi.apache.org <de...@unomi.apache.org>
Objet : Re: Allow deserialization of profile in CustomObjectMapper

Hello Adrien,

After some thinking this might be problematic in terms of security. In
Unomi 2 we have a new system to protect the data that allows these types to
be used.

Could you explain what you are trying to do because there are surely
alternative ways to do it ?

Best regards,
  Serge

Serge Huber
CTO & Co-Founder
T +41 22 361 3424
9 route des Jeunes | 1227 Acacias | Switzerland
jahia.com <http://www.jahia.com/>
SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
<https://twitter.com/sergehuber> | VCARD
<http://www.jahia.com/vcard/HuberSerge.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.


On Tue, May 3, 2022 at 2:51 PM OLIVA Adrien <ao...@sefas.com> wrote:

> Hello Serge,
>
> Great, I created it so! Both Jira ticket and pull request.
>
> Regards.
> ________________________________
> De : Serge Huber <sh...@jahia.com.INVALID>
> Envoyé : mardi 3 mai 2022 14:20
> À : dev@unomi.apache.org <de...@unomi.apache.org>
> Objet : Re: Allow deserialization of profile in CustomObjectMapper
>
> Hello Adrian,
>
> You are still welcome to create a PR for your patch, we might even merge it
> but I can't guarantee it will be released soon :)
>
> Regards,
>   Serge...
> Serge Huber
> CTO & Co-Founder
> T +41 22 361 3424
> 9 route des Jeunes | 1227 Acacias | Switzerland
> jahia.com <http://www.jahia.com/>
> SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> <https://twitter.com/sergehuber> | VCARD
> <http://www.jahia.com/vcard/HuberSerge.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.
>
>
> On Tue, May 3, 2022 at 2:19 PM OLIVA Adrien <ao...@sefas.com> wrote:
>
> > Ok, I understand now!
> > I will keep my patch with 1.6.0 and I'll go upstream with newer version
> > once it will be released!
> >
> > Thank you very much.
> >
> > Regards.
> > ________________________________
> > De : Serge Huber <sh...@jahia.com.INVALID>
> > Envoyé : mardi 3 mai 2022 14:11
> > À : dev@unomi.apache.org <de...@unomi.apache.org>
> > Objet : Re: Allow deserialization of profile in CustomObjectMapper
> >
> > Hello Adrian,
> >
> > I think I understand the problem, I was looking at the source code on the
> > master branch that has a lot more registered classes in the
> > CustomObjectMapper, while you are looking at the 1.6 branch
> >
> > We are currently hard at work on the Unomi 2 branch.
> >
> > For the UNOMI-XXX it's simply a matter of creating a ticket in the Unomi
> > issue tracker here:
> https://issues.apache.org/jira/projects/UNOMI/summary
> >
> > I think it might be better to backport the changes from the master to the
> > Unomi 1.6 but at the same time we have no immediate plans for a 1.6.1
> > release and are instead focusing on a 2.0 as much as possible.
> >
> > Regards,
> >   Serge...
> >
> > Serge Huber
> > CTO & Co-Founder
> > T +41 22 361 3424
> > 9 route des Jeunes | 1227 Acacias | Switzerland
> > jahia.com <http://www.jahia.com/>
> > SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> > <https://twitter.com/sergehuber> | VCARD
> > <http://www.jahia.com/vcard/HuberSerge.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.
> >
> >
> > On Tue, May 3, 2022 at 12:34 PM OLIVA Adrien <ao...@sefas.com> wrote:
> >
> > > Hi,
> > >
> > > In fact, I already look at persistence/spi package, made a patch for
> > > myself that seems to work well in my case! (I double check and I really
> > > have "profile" in itemType field).
> > >
> > > I wanted to create a pull-request on your Github with my patch, but it
> > ask
> > > fro a UNOMI-XXXX tag and recommend to ask on dev mailing list! That's
> > what
> > > I do!!!
> > >
> > > I attach my patch to this email. As you can see, it seems that
> > > CustomObjectMapper register many kind of item types, except Profile.
> > >
> > > But if you recommend to look at PropertyTypedObjectDeserializer to
> find a
> > > "cleaner" solution, I can try to figure it out.
> > >
> > > Regards.
> > > ------------------------------
> > > *De :* Serge Huber <sh...@jahia.com.INVALID>
> > > *Envoyé :* mardi 3 mai 2022 11:55
> > > *À :* dev@unomi.apache.org <de...@unomi.apache.org>
> > > *Objet :* Re: Allow deserialization of profile in CustomObjectMapper
> > >
> > > Hello Adrien,
> > >
> > > I just checked and the deserialization is setup for the profile item
> > type,
> > > for "top level" item types, but maybe it is missing a mapping for the
> > event
> > > source and target properties. This is something that needs checking.
> > >
> > > If you want to contribute that would be fantastic. I think it would be
> > good
> > > to look at the
> > >
> > >
> >
> https://github.com/apache/unomi/blob/64281306c770c710ec737f64ece7332f54e91cd5/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PropertyTypedObjectDeserializer.java#L53
> > > object to see if it can work with sub-objects and if it can to see how
> we
> > > could do a generic mapping system for event objects.
> > >
> > > Regards,
> > >   Serge Huber.
> > > Serge Huber
> > > CTO & Co-Founder
> > > T +41 22 361 3424
> > > 9 route des Jeunes | 1227 Acacias | Switzerland
> > > jahia.com <http://www.jahia.com/>
> > > SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> > > <https://twitter.com/sergehuber> | VCARD
> > > <http://www.jahia.com/vcard/HuberSerge.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.
> > >
> > >
> > > On Thu, Apr 28, 2022 at 4:25 PM OLIVA Adrien <ao...@sefas.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > I found a "bug" in Unomi while doing some test.
> > > > When a profile object is stored as event's target or source, Jackson
> > > > failed to deserialize item while getting such events (through POST
> > > > /cxs/events/search for instance).
> > > >
> > > > It appears that Profile deserializer is missing in CustomObjectMapper
> > > used
> > > > in Unomi.
> > > >
> > > > How can I contribute to fix this issue.
> > > >
> > > > Regards.
> > > >
> > > >
> > > >
> > > > Adrien Oliva
> > > > Ingénieur Logiciel
> > > >
> > > >                 ≡
> > > >      S E F A S
> > > > UNE MARQUE DE DOCAPOSTE
> > > >
> > > > 6 rue de l’étang - 90000 Belfort
> > > > E-mail : aoliva@sefas.com
> > > > www.sefasinnovation.fr<http://www.sefasinnovation.fr><<http://www.sefasinnovation.fr<http://www.sefasinnovation.fr><>
> http://www.sefasinnovation.fr<http://www.sefasinnovation.fr>> -
> > www.docaposte.com<http://www.docaposte.com>
> > > >
> > > >
> > > > Sefas est une marque de Docaposte, filiale du Groupe La Poste.
> > > > Adoptez l’éco-attitude : n’imprimez que si cela vous semble
> > > > nécessaire.
> > > > Si vous recevez ce mail en dehors de vos heures de travail ou
> > > > pendant vos congés, vous n’avez pas à y répondre immédiatement,
> > > > sauf en cas d'urgence exceptionnelle.
> > > >
> > > >
> > >
> >
>

Re: Allow deserialization of profile in CustomObjectMapper

Posted by Serge Huber <sh...@jahia.com.INVALID>.
Hello Adrien,

After some thinking this might be problematic in terms of security. In
Unomi 2 we have a new system to protect the data that allows these types to
be used.

Could you explain what you are trying to do because there are surely
alternative ways to do it ?

Best regards,
  Serge

Serge Huber
CTO & Co-Founder
T +41 22 361 3424
9 route des Jeunes | 1227 Acacias | Switzerland
jahia.com <http://www.jahia.com/>
SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
<https://twitter.com/sergehuber> | VCARD
<http://www.jahia.com/vcard/HuberSerge.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.


On Tue, May 3, 2022 at 2:51 PM OLIVA Adrien <ao...@sefas.com> wrote:

> Hello Serge,
>
> Great, I created it so! Both Jira ticket and pull request.
>
> Regards.
> ________________________________
> De : Serge Huber <sh...@jahia.com.INVALID>
> Envoyé : mardi 3 mai 2022 14:20
> À : dev@unomi.apache.org <de...@unomi.apache.org>
> Objet : Re: Allow deserialization of profile in CustomObjectMapper
>
> Hello Adrian,
>
> You are still welcome to create a PR for your patch, we might even merge it
> but I can't guarantee it will be released soon :)
>
> Regards,
>   Serge...
> Serge Huber
> CTO & Co-Founder
> T +41 22 361 3424
> 9 route des Jeunes | 1227 Acacias | Switzerland
> jahia.com <http://www.jahia.com/>
> SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> <https://twitter.com/sergehuber> | VCARD
> <http://www.jahia.com/vcard/HuberSerge.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.
>
>
> On Tue, May 3, 2022 at 2:19 PM OLIVA Adrien <ao...@sefas.com> wrote:
>
> > Ok, I understand now!
> > I will keep my patch with 1.6.0 and I'll go upstream with newer version
> > once it will be released!
> >
> > Thank you very much.
> >
> > Regards.
> > ________________________________
> > De : Serge Huber <sh...@jahia.com.INVALID>
> > Envoyé : mardi 3 mai 2022 14:11
> > À : dev@unomi.apache.org <de...@unomi.apache.org>
> > Objet : Re: Allow deserialization of profile in CustomObjectMapper
> >
> > Hello Adrian,
> >
> > I think I understand the problem, I was looking at the source code on the
> > master branch that has a lot more registered classes in the
> > CustomObjectMapper, while you are looking at the 1.6 branch
> >
> > We are currently hard at work on the Unomi 2 branch.
> >
> > For the UNOMI-XXX it's simply a matter of creating a ticket in the Unomi
> > issue tracker here:
> https://issues.apache.org/jira/projects/UNOMI/summary
> >
> > I think it might be better to backport the changes from the master to the
> > Unomi 1.6 but at the same time we have no immediate plans for a 1.6.1
> > release and are instead focusing on a 2.0 as much as possible.
> >
> > Regards,
> >   Serge...
> >
> > Serge Huber
> > CTO & Co-Founder
> > T +41 22 361 3424
> > 9 route des Jeunes | 1227 Acacias | Switzerland
> > jahia.com <http://www.jahia.com/>
> > SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> > <https://twitter.com/sergehuber> | VCARD
> > <http://www.jahia.com/vcard/HuberSerge.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.
> >
> >
> > On Tue, May 3, 2022 at 12:34 PM OLIVA Adrien <ao...@sefas.com> wrote:
> >
> > > Hi,
> > >
> > > In fact, I already look at persistence/spi package, made a patch for
> > > myself that seems to work well in my case! (I double check and I really
> > > have "profile" in itemType field).
> > >
> > > I wanted to create a pull-request on your Github with my patch, but it
> > ask
> > > fro a UNOMI-XXXX tag and recommend to ask on dev mailing list! That's
> > what
> > > I do!!!
> > >
> > > I attach my patch to this email. As you can see, it seems that
> > > CustomObjectMapper register many kind of item types, except Profile.
> > >
> > > But if you recommend to look at PropertyTypedObjectDeserializer to
> find a
> > > "cleaner" solution, I can try to figure it out.
> > >
> > > Regards.
> > > ------------------------------
> > > *De :* Serge Huber <sh...@jahia.com.INVALID>
> > > *Envoyé :* mardi 3 mai 2022 11:55
> > > *À :* dev@unomi.apache.org <de...@unomi.apache.org>
> > > *Objet :* Re: Allow deserialization of profile in CustomObjectMapper
> > >
> > > Hello Adrien,
> > >
> > > I just checked and the deserialization is setup for the profile item
> > type,
> > > for "top level" item types, but maybe it is missing a mapping for the
> > event
> > > source and target properties. This is something that needs checking.
> > >
> > > If you want to contribute that would be fantastic. I think it would be
> > good
> > > to look at the
> > >
> > >
> >
> https://github.com/apache/unomi/blob/64281306c770c710ec737f64ece7332f54e91cd5/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PropertyTypedObjectDeserializer.java#L53
> > > object to see if it can work with sub-objects and if it can to see how
> we
> > > could do a generic mapping system for event objects.
> > >
> > > Regards,
> > >   Serge Huber.
> > > Serge Huber
> > > CTO & Co-Founder
> > > T +41 22 361 3424
> > > 9 route des Jeunes | 1227 Acacias | Switzerland
> > > jahia.com <http://www.jahia.com/>
> > > SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> > > <https://twitter.com/sergehuber> | VCARD
> > > <http://www.jahia.com/vcard/HuberSerge.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.
> > >
> > >
> > > On Thu, Apr 28, 2022 at 4:25 PM OLIVA Adrien <ao...@sefas.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > I found a "bug" in Unomi while doing some test.
> > > > When a profile object is stored as event's target or source, Jackson
> > > > failed to deserialize item while getting such events (through POST
> > > > /cxs/events/search for instance).
> > > >
> > > > It appears that Profile deserializer is missing in CustomObjectMapper
> > > used
> > > > in Unomi.
> > > >
> > > > How can I contribute to fix this issue.
> > > >
> > > > Regards.
> > > >
> > > >
> > > >
> > > > Adrien Oliva
> > > > Ingénieur Logiciel
> > > >
> > > >                 ≡
> > > >      S E F A S
> > > > UNE MARQUE DE DOCAPOSTE
> > > >
> > > > 6 rue de l’étang - 90000 Belfort
> > > > E-mail : aoliva@sefas.com
> > > > www.sefasinnovation.fr<http://www.sefasinnovation.fr><
> http://www.sefasinnovation.fr<http://www.sefasinnovation.fr>> -
> > www.docaposte.com<http://www.docaposte.com>
> > > >
> > > >
> > > > Sefas est une marque de Docaposte, filiale du Groupe La Poste.
> > > > Adoptez l’éco-attitude : n’imprimez que si cela vous semble
> > > > nécessaire.
> > > > Si vous recevez ce mail en dehors de vos heures de travail ou
> > > > pendant vos congés, vous n’avez pas à y répondre immédiatement,
> > > > sauf en cas d'urgence exceptionnelle.
> > > >
> > > >
> > >
> >
>

RE: Allow deserialization of profile in CustomObjectMapper

Posted by OLIVA Adrien <ao...@sefas.com>.
Hello Serge,

Great, I created it so! Both Jira ticket and pull request.

Regards.
________________________________
De : Serge Huber <sh...@jahia.com.INVALID>
Envoyé : mardi 3 mai 2022 14:20
À : dev@unomi.apache.org <de...@unomi.apache.org>
Objet : Re: Allow deserialization of profile in CustomObjectMapper

Hello Adrian,

You are still welcome to create a PR for your patch, we might even merge it
but I can't guarantee it will be released soon :)

Regards,
  Serge...
Serge Huber
CTO & Co-Founder
T +41 22 361 3424
9 route des Jeunes | 1227 Acacias | Switzerland
jahia.com <http://www.jahia.com/>
SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
<https://twitter.com/sergehuber> | VCARD
<http://www.jahia.com/vcard/HuberSerge.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.


On Tue, May 3, 2022 at 2:19 PM OLIVA Adrien <ao...@sefas.com> wrote:

> Ok, I understand now!
> I will keep my patch with 1.6.0 and I'll go upstream with newer version
> once it will be released!
>
> Thank you very much.
>
> Regards.
> ________________________________
> De : Serge Huber <sh...@jahia.com.INVALID>
> Envoyé : mardi 3 mai 2022 14:11
> À : dev@unomi.apache.org <de...@unomi.apache.org>
> Objet : Re: Allow deserialization of profile in CustomObjectMapper
>
> Hello Adrian,
>
> I think I understand the problem, I was looking at the source code on the
> master branch that has a lot more registered classes in the
> CustomObjectMapper, while you are looking at the 1.6 branch
>
> We are currently hard at work on the Unomi 2 branch.
>
> For the UNOMI-XXX it's simply a matter of creating a ticket in the Unomi
> issue tracker here: https://issues.apache.org/jira/projects/UNOMI/summary
>
> I think it might be better to backport the changes from the master to the
> Unomi 1.6 but at the same time we have no immediate plans for a 1.6.1
> release and are instead focusing on a 2.0 as much as possible.
>
> Regards,
>   Serge...
>
> Serge Huber
> CTO & Co-Founder
> T +41 22 361 3424
> 9 route des Jeunes | 1227 Acacias | Switzerland
> jahia.com <http://www.jahia.com/>
> SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> <https://twitter.com/sergehuber> | VCARD
> <http://www.jahia.com/vcard/HuberSerge.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.
>
>
> On Tue, May 3, 2022 at 12:34 PM OLIVA Adrien <ao...@sefas.com> wrote:
>
> > Hi,
> >
> > In fact, I already look at persistence/spi package, made a patch for
> > myself that seems to work well in my case! (I double check and I really
> > have "profile" in itemType field).
> >
> > I wanted to create a pull-request on your Github with my patch, but it
> ask
> > fro a UNOMI-XXXX tag and recommend to ask on dev mailing list! That's
> what
> > I do!!!
> >
> > I attach my patch to this email. As you can see, it seems that
> > CustomObjectMapper register many kind of item types, except Profile.
> >
> > But if you recommend to look at PropertyTypedObjectDeserializer to find a
> > "cleaner" solution, I can try to figure it out.
> >
> > Regards.
> > ------------------------------
> > *De :* Serge Huber <sh...@jahia.com.INVALID>
> > *Envoyé :* mardi 3 mai 2022 11:55
> > *À :* dev@unomi.apache.org <de...@unomi.apache.org>
> > *Objet :* Re: Allow deserialization of profile in CustomObjectMapper
> >
> > Hello Adrien,
> >
> > I just checked and the deserialization is setup for the profile item
> type,
> > for "top level" item types, but maybe it is missing a mapping for the
> event
> > source and target properties. This is something that needs checking.
> >
> > If you want to contribute that would be fantastic. I think it would be
> good
> > to look at the
> >
> >
> https://github.com/apache/unomi/blob/64281306c770c710ec737f64ece7332f54e91cd5/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PropertyTypedObjectDeserializer.java#L53
> > object to see if it can work with sub-objects and if it can to see how we
> > could do a generic mapping system for event objects.
> >
> > Regards,
> >   Serge Huber.
> > Serge Huber
> > CTO & Co-Founder
> > T +41 22 361 3424
> > 9 route des Jeunes | 1227 Acacias | Switzerland
> > jahia.com <http://www.jahia.com/>
> > SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> > <https://twitter.com/sergehuber> | VCARD
> > <http://www.jahia.com/vcard/HuberSerge.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.
> >
> >
> > On Thu, Apr 28, 2022 at 4:25 PM OLIVA Adrien <ao...@sefas.com> wrote:
> >
> > > Hi,
> > >
> > > I found a "bug" in Unomi while doing some test.
> > > When a profile object is stored as event's target or source, Jackson
> > > failed to deserialize item while getting such events (through POST
> > > /cxs/events/search for instance).
> > >
> > > It appears that Profile deserializer is missing in CustomObjectMapper
> > used
> > > in Unomi.
> > >
> > > How can I contribute to fix this issue.
> > >
> > > Regards.
> > >
> > >
> > >
> > > Adrien Oliva
> > > Ingénieur Logiciel
> > >
> > >                 ≡
> > >      S E F A S
> > > UNE MARQUE DE DOCAPOSTE
> > >
> > > 6 rue de l’étang - 90000 Belfort
> > > E-mail : aoliva@sefas.com
> > > www.sefasinnovation.fr<http://www.sefasinnovation.fr><http://www.sefasinnovation.fr<http://www.sefasinnovation.fr>> -
> www.docaposte.com<http://www.docaposte.com>
> > >
> > >
> > > Sefas est une marque de Docaposte, filiale du Groupe La Poste.
> > > Adoptez l’éco-attitude : n’imprimez que si cela vous semble
> > > nécessaire.
> > > Si vous recevez ce mail en dehors de vos heures de travail ou
> > > pendant vos congés, vous n’avez pas à y répondre immédiatement,
> > > sauf en cas d'urgence exceptionnelle.
> > >
> > >
> >
>

Re: Allow deserialization of profile in CustomObjectMapper

Posted by Serge Huber <sh...@jahia.com.INVALID>.
Hello Adrian,

You are still welcome to create a PR for your patch, we might even merge it
but I can't guarantee it will be released soon :)

Regards,
  Serge...
Serge Huber
CTO & Co-Founder
T +41 22 361 3424
9 route des Jeunes | 1227 Acacias | Switzerland
jahia.com <http://www.jahia.com/>
SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
<https://twitter.com/sergehuber> | VCARD
<http://www.jahia.com/vcard/HuberSerge.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.


On Tue, May 3, 2022 at 2:19 PM OLIVA Adrien <ao...@sefas.com> wrote:

> Ok, I understand now!
> I will keep my patch with 1.6.0 and I'll go upstream with newer version
> once it will be released!
>
> Thank you very much.
>
> Regards.
> ________________________________
> De : Serge Huber <sh...@jahia.com.INVALID>
> Envoyé : mardi 3 mai 2022 14:11
> À : dev@unomi.apache.org <de...@unomi.apache.org>
> Objet : Re: Allow deserialization of profile in CustomObjectMapper
>
> Hello Adrian,
>
> I think I understand the problem, I was looking at the source code on the
> master branch that has a lot more registered classes in the
> CustomObjectMapper, while you are looking at the 1.6 branch
>
> We are currently hard at work on the Unomi 2 branch.
>
> For the UNOMI-XXX it's simply a matter of creating a ticket in the Unomi
> issue tracker here: https://issues.apache.org/jira/projects/UNOMI/summary
>
> I think it might be better to backport the changes from the master to the
> Unomi 1.6 but at the same time we have no immediate plans for a 1.6.1
> release and are instead focusing on a 2.0 as much as possible.
>
> Regards,
>   Serge...
>
> Serge Huber
> CTO & Co-Founder
> T +41 22 361 3424
> 9 route des Jeunes | 1227 Acacias | Switzerland
> jahia.com <http://www.jahia.com/>
> SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> <https://twitter.com/sergehuber> | VCARD
> <http://www.jahia.com/vcard/HuberSerge.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.
>
>
> On Tue, May 3, 2022 at 12:34 PM OLIVA Adrien <ao...@sefas.com> wrote:
>
> > Hi,
> >
> > In fact, I already look at persistence/spi package, made a patch for
> > myself that seems to work well in my case! (I double check and I really
> > have "profile" in itemType field).
> >
> > I wanted to create a pull-request on your Github with my patch, but it
> ask
> > fro a UNOMI-XXXX tag and recommend to ask on dev mailing list! That's
> what
> > I do!!!
> >
> > I attach my patch to this email. As you can see, it seems that
> > CustomObjectMapper register many kind of item types, except Profile.
> >
> > But if you recommend to look at PropertyTypedObjectDeserializer to find a
> > "cleaner" solution, I can try to figure it out.
> >
> > Regards.
> > ------------------------------
> > *De :* Serge Huber <sh...@jahia.com.INVALID>
> > *Envoyé :* mardi 3 mai 2022 11:55
> > *À :* dev@unomi.apache.org <de...@unomi.apache.org>
> > *Objet :* Re: Allow deserialization of profile in CustomObjectMapper
> >
> > Hello Adrien,
> >
> > I just checked and the deserialization is setup for the profile item
> type,
> > for "top level" item types, but maybe it is missing a mapping for the
> event
> > source and target properties. This is something that needs checking.
> >
> > If you want to contribute that would be fantastic. I think it would be
> good
> > to look at the
> >
> >
> https://github.com/apache/unomi/blob/64281306c770c710ec737f64ece7332f54e91cd5/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PropertyTypedObjectDeserializer.java#L53
> > object to see if it can work with sub-objects and if it can to see how we
> > could do a generic mapping system for event objects.
> >
> > Regards,
> >   Serge Huber.
> > Serge Huber
> > CTO & Co-Founder
> > T +41 22 361 3424
> > 9 route des Jeunes | 1227 Acacias | Switzerland
> > jahia.com <http://www.jahia.com/>
> > SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> > <https://twitter.com/sergehuber> | VCARD
> > <http://www.jahia.com/vcard/HuberSerge.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.
> >
> >
> > On Thu, Apr 28, 2022 at 4:25 PM OLIVA Adrien <ao...@sefas.com> wrote:
> >
> > > Hi,
> > >
> > > I found a "bug" in Unomi while doing some test.
> > > When a profile object is stored as event's target or source, Jackson
> > > failed to deserialize item while getting such events (through POST
> > > /cxs/events/search for instance).
> > >
> > > It appears that Profile deserializer is missing in CustomObjectMapper
> > used
> > > in Unomi.
> > >
> > > How can I contribute to fix this issue.
> > >
> > > Regards.
> > >
> > >
> > >
> > > Adrien Oliva
> > > Ingénieur Logiciel
> > >
> > >                 ≡
> > >      S E F A S
> > > UNE MARQUE DE DOCAPOSTE
> > >
> > > 6 rue de l’étang - 90000 Belfort
> > > E-mail : aoliva@sefas.com
> > > www.sefasinnovation.fr<http://www.sefasinnovation.fr> -
> www.docaposte.com<http://www.docaposte.com>
> > >
> > >
> > > Sefas est une marque de Docaposte, filiale du Groupe La Poste.
> > > Adoptez l’éco-attitude : n’imprimez que si cela vous semble
> > > nécessaire.
> > > Si vous recevez ce mail en dehors de vos heures de travail ou
> > > pendant vos congés, vous n’avez pas à y répondre immédiatement,
> > > sauf en cas d'urgence exceptionnelle.
> > >
> > >
> >
>

RE: Allow deserialization of profile in CustomObjectMapper

Posted by OLIVA Adrien <ao...@sefas.com>.
Ok, I understand now!
I will keep my patch with 1.6.0 and I'll go upstream with newer version once it will be released!

Thank you very much.

Regards.
________________________________
De : Serge Huber <sh...@jahia.com.INVALID>
Envoyé : mardi 3 mai 2022 14:11
À : dev@unomi.apache.org <de...@unomi.apache.org>
Objet : Re: Allow deserialization of profile in CustomObjectMapper

Hello Adrian,

I think I understand the problem, I was looking at the source code on the
master branch that has a lot more registered classes in the
CustomObjectMapper, while you are looking at the 1.6 branch

We are currently hard at work on the Unomi 2 branch.

For the UNOMI-XXX it's simply a matter of creating a ticket in the Unomi
issue tracker here: https://issues.apache.org/jira/projects/UNOMI/summary

I think it might be better to backport the changes from the master to the
Unomi 1.6 but at the same time we have no immediate plans for a 1.6.1
release and are instead focusing on a 2.0 as much as possible.

Regards,
  Serge...

Serge Huber
CTO & Co-Founder
T +41 22 361 3424
9 route des Jeunes | 1227 Acacias | Switzerland
jahia.com <http://www.jahia.com/>
SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
<https://twitter.com/sergehuber> | VCARD
<http://www.jahia.com/vcard/HuberSerge.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.


On Tue, May 3, 2022 at 12:34 PM OLIVA Adrien <ao...@sefas.com> wrote:

> Hi,
>
> In fact, I already look at persistence/spi package, made a patch for
> myself that seems to work well in my case! (I double check and I really
> have "profile" in itemType field).
>
> I wanted to create a pull-request on your Github with my patch, but it ask
> fro a UNOMI-XXXX tag and recommend to ask on dev mailing list! That's what
> I do!!!
>
> I attach my patch to this email. As you can see, it seems that
> CustomObjectMapper register many kind of item types, except Profile.
>
> But if you recommend to look at PropertyTypedObjectDeserializer to find a
> "cleaner" solution, I can try to figure it out.
>
> Regards.
> ------------------------------
> *De :* Serge Huber <sh...@jahia.com.INVALID>
> *Envoyé :* mardi 3 mai 2022 11:55
> *À :* dev@unomi.apache.org <de...@unomi.apache.org>
> *Objet :* Re: Allow deserialization of profile in CustomObjectMapper
>
> Hello Adrien,
>
> I just checked and the deserialization is setup for the profile item type,
> for "top level" item types, but maybe it is missing a mapping for the event
> source and target properties. This is something that needs checking.
>
> If you want to contribute that would be fantastic. I think it would be good
> to look at the
>
> https://github.com/apache/unomi/blob/64281306c770c710ec737f64ece7332f54e91cd5/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PropertyTypedObjectDeserializer.java#L53
> object to see if it can work with sub-objects and if it can to see how we
> could do a generic mapping system for event objects.
>
> Regards,
>   Serge Huber.
> Serge Huber
> CTO & Co-Founder
> T +41 22 361 3424
> 9 route des Jeunes | 1227 Acacias | Switzerland
> jahia.com <http://www.jahia.com/>
> SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> <https://twitter.com/sergehuber> | VCARD
> <http://www.jahia.com/vcard/HuberSerge.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.
>
>
> On Thu, Apr 28, 2022 at 4:25 PM OLIVA Adrien <ao...@sefas.com> wrote:
>
> > Hi,
> >
> > I found a "bug" in Unomi while doing some test.
> > When a profile object is stored as event's target or source, Jackson
> > failed to deserialize item while getting such events (through POST
> > /cxs/events/search for instance).
> >
> > It appears that Profile deserializer is missing in CustomObjectMapper
> used
> > in Unomi.
> >
> > How can I contribute to fix this issue.
> >
> > Regards.
> >
> >
> >
> > Adrien Oliva
> > Ingénieur Logiciel
> >
> >                 ≡
> >      S E F A S
> > UNE MARQUE DE DOCAPOSTE
> >
> > 6 rue de l’étang - 90000 Belfort
> > E-mail : aoliva@sefas.com
> > www.sefasinnovation.fr<http://www.sefasinnovation.fr> - www.docaposte.com<http://www.docaposte.com>
> >
> >
> > Sefas est une marque de Docaposte, filiale du Groupe La Poste.
> > Adoptez l’éco-attitude : n’imprimez que si cela vous semble
> > nécessaire.
> > Si vous recevez ce mail en dehors de vos heures de travail ou
> > pendant vos congés, vous n’avez pas à y répondre immédiatement,
> > sauf en cas d'urgence exceptionnelle.
> >
> >
>

Re: Allow deserialization of profile in CustomObjectMapper

Posted by Serge Huber <sh...@jahia.com.INVALID>.
Hello Adrian,

I think I understand the problem, I was looking at the source code on the
master branch that has a lot more registered classes in the
CustomObjectMapper, while you are looking at the 1.6 branch

We are currently hard at work on the Unomi 2 branch.

For the UNOMI-XXX it's simply a matter of creating a ticket in the Unomi
issue tracker here: https://issues.apache.org/jira/projects/UNOMI/summary

I think it might be better to backport the changes from the master to the
Unomi 1.6 but at the same time we have no immediate plans for a 1.6.1
release and are instead focusing on a 2.0 as much as possible.

Regards,
  Serge...

Serge Huber
CTO & Co-Founder
T +41 22 361 3424
9 route des Jeunes | 1227 Acacias | Switzerland
jahia.com <http://www.jahia.com/>
SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
<https://twitter.com/sergehuber> | VCARD
<http://www.jahia.com/vcard/HuberSerge.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.


On Tue, May 3, 2022 at 12:34 PM OLIVA Adrien <ao...@sefas.com> wrote:

> Hi,
>
> In fact, I already look at persistence/spi package, made a patch for
> myself that seems to work well in my case! (I double check and I really
> have "profile" in itemType field).
>
> I wanted to create a pull-request on your Github with my patch, but it ask
> fro a UNOMI-XXXX tag and recommend to ask on dev mailing list! That's what
> I do!!!
>
> I attach my patch to this email. As you can see, it seems that
> CustomObjectMapper register many kind of item types, except Profile.
>
> But if you recommend to look at PropertyTypedObjectDeserializer to find a
> "cleaner" solution, I can try to figure it out.
>
> Regards.
> ------------------------------
> *De :* Serge Huber <sh...@jahia.com.INVALID>
> *Envoyé :* mardi 3 mai 2022 11:55
> *À :* dev@unomi.apache.org <de...@unomi.apache.org>
> *Objet :* Re: Allow deserialization of profile in CustomObjectMapper
>
> Hello Adrien,
>
> I just checked and the deserialization is setup for the profile item type,
> for "top level" item types, but maybe it is missing a mapping for the event
> source and target properties. This is something that needs checking.
>
> If you want to contribute that would be fantastic. I think it would be good
> to look at the
>
> https://github.com/apache/unomi/blob/64281306c770c710ec737f64ece7332f54e91cd5/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PropertyTypedObjectDeserializer.java#L53
> object to see if it can work with sub-objects and if it can to see how we
> could do a generic mapping system for event objects.
>
> Regards,
>   Serge Huber.
> Serge Huber
> CTO & Co-Founder
> T +41 22 361 3424
> 9 route des Jeunes | 1227 Acacias | Switzerland
> jahia.com <http://www.jahia.com/>
> SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> <https://twitter.com/sergehuber> | VCARD
> <http://www.jahia.com/vcard/HuberSerge.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.
>
>
> On Thu, Apr 28, 2022 at 4:25 PM OLIVA Adrien <ao...@sefas.com> wrote:
>
> > Hi,
> >
> > I found a "bug" in Unomi while doing some test.
> > When a profile object is stored as event's target or source, Jackson
> > failed to deserialize item while getting such events (through POST
> > /cxs/events/search for instance).
> >
> > It appears that Profile deserializer is missing in CustomObjectMapper
> used
> > in Unomi.
> >
> > How can I contribute to fix this issue.
> >
> > Regards.
> >
> >
> >
> > Adrien Oliva
> > Ingénieur Logiciel
> >
> >                 ≡
> >      S E F A S
> > UNE MARQUE DE DOCAPOSTE
> >
> > 6 rue de l’étang - 90000 Belfort
> > E-mail : aoliva@sefas.com
> > www.sefasinnovation.fr - www.docaposte.com
> >
> >
> > Sefas est une marque de Docaposte, filiale du Groupe La Poste.
> > Adoptez l’éco-attitude : n’imprimez que si cela vous semble
> > nécessaire.
> > Si vous recevez ce mail en dehors de vos heures de travail ou
> > pendant vos congés, vous n’avez pas à y répondre immédiatement,
> > sauf en cas d'urgence exceptionnelle.
> >
> >
>

RE: Allow deserialization of profile in CustomObjectMapper

Posted by OLIVA Adrien <ao...@sefas.com>.
Hi,

In fact, I already look at persistence/spi package, made a patch for myself that seems to work well in my case! (I double check and I really have "profile" in itemType field).

I wanted to create a pull-request on your Github with my patch, but it ask fro a UNOMI-XXXX tag and recommend to ask on dev mailing list! That's what I do!!!

I attach my patch to this email. As you can see, it seems that CustomObjectMapper register many kind of item types, except Profile.

But if you recommend to look at PropertyTypedObjectDeserializer to find a "cleaner" solution, I can try to figure it out.

Regards.
________________________________
De : Serge Huber <sh...@jahia.com.INVALID>
Envoyé : mardi 3 mai 2022 11:55
À : dev@unomi.apache.org <de...@unomi.apache.org>
Objet : Re: Allow deserialization of profile in CustomObjectMapper

Hello Adrien,

I just checked and the deserialization is setup for the profile item type,
for "top level" item types, but maybe it is missing a mapping for the event
source and target properties. This is something that needs checking.

If you want to contribute that would be fantastic. I think it would be good
to look at the
https://github.com/apache/unomi/blob/64281306c770c710ec737f64ece7332f54e91cd5/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PropertyTypedObjectDeserializer.java#L53
object to see if it can work with sub-objects and if it can to see how we
could do a generic mapping system for event objects.

Regards,
  Serge Huber.
Serge Huber
CTO & Co-Founder
T +41 22 361 3424
9 route des Jeunes | 1227 Acacias | Switzerland
jahia.com <http://www.jahia.com/>
SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
<https://twitter.com/sergehuber> | VCARD
<http://www.jahia.com/vcard/HuberSerge.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.


On Thu, Apr 28, 2022 at 4:25 PM OLIVA Adrien <ao...@sefas.com> wrote:

> Hi,
>
> I found a "bug" in Unomi while doing some test.
> When a profile object is stored as event's target or source, Jackson
> failed to deserialize item while getting such events (through POST
> /cxs/events/search for instance).
>
> It appears that Profile deserializer is missing in CustomObjectMapper used
> in Unomi.
>
> How can I contribute to fix this issue.
>
> Regards.
>
>
>
> Adrien Oliva
> Ingénieur Logiciel
>
>                 ≡
>      S E F A S
> UNE MARQUE DE DOCAPOSTE
>
> 6 rue de l’étang - 90000 Belfort
> E-mail : aoliva@sefas.com
> www.sefasinnovation.fr<http://www.sefasinnovation.fr> - www.docaposte.com<http://www.docaposte.com>
>
>
> Sefas est une marque de Docaposte, filiale du Groupe La Poste.
> Adoptez l’éco-attitude : n’imprimez que si cela vous semble
> nécessaire.
> Si vous recevez ce mail en dehors de vos heures de travail ou
> pendant vos congés, vous n’avez pas à y répondre immédiatement,
> sauf en cas d'urgence exceptionnelle.
>
>