Highlighted

AEM UUID

hari_purushotha

06-08-2018

Hi,

I would like know the case-sensitivity of the UUID generated in AEM.

Currently I see the UUID is generated,

  • UUID represented as 32 hexadecimal digits and displayed in five groups separated by hyphens in the form 8-4-4-4-12 for a total of 36 characters
  • Technically in Hex decimal system there is no uppercase or lowercase difference.  
  • UUID generation guidelines suggest the systems to use lowercase ( RFC4122).

If above conditions are true then UUID generated in aem will always be in lowercase?Can anyone confirm on this.

Regards,

Hari

Replies

Highlighted

Jörg_Hoh

Employee

06-08-2018

What UUIDs are you talking about? And why is it important to know the details of the creation algorithm? Do you want to create UUIDS on your own?

regards,

Jörg

Highlighted

hari_purushotha

06-08-2018

Hi,

i am am taking about “jcr:uuid”....I am going to send the “jcr:uuid” created in aem to my downstream systems for storing in their databas...

Highlighted

Jörg_Hoh

Employee

06-08-2018

A few thoughts to your approach:

  1. UUIDs are implementation details of the repository, and I would never reference them from an external system. I would always use paths instead.
  2. Remember David's Model, rule 7 [2].

To answer your question: A lot of Oak classes use an import of "java.util.UUID", and I've seen several times it being used. That means, I would assume that this class is used to generate UUIDs. But as long as it is not part of the official API of either JCR, Oak or AEM, I would always consider this as an implementation detail. It might work, but it also might break without further notice. In any case I would not depend on it. As said, rather use the path.

Jörg

[1] DavidsModel - Jackrabbit Wiki