Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

Using email id as Node name

Avatar

Level 3

Hi,

 

I have a form to grab email id and other info for registration and saving as nodes.

 

I just want an advice on how right or safe to use email id as Node name.

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @hptarora 

If your application requires any specific logic to create node based on certain name you can use that else you can generate node name using UUID:

UUID uuid = UUID.randomUUID();
String nodeName = uuid.toString();

 

Now all the form values can be stored as a node property in the node so it will be something like below:

asutosh_jena_0-1621231196403.png

 

Thanks! 

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

Hi @hptarora 

If your application requires any specific logic to create node based on certain name you can use that else you can generate node name using UUID:

UUID uuid = UUID.randomUUID();
String nodeName = uuid.toString();

 

Now all the form values can be stored as a node property in the node so it will be something like below:

asutosh_jena_0-1621231196403.png

 

Thanks! 

Avatar

Community Advisor

@hptarora There is no such documentation, but this might be helpful where it says 150 chars.

https://issues.apache.org/jira/browse/OAK-2644

 

You can put upto 350 characters (500 characters is max) as per the above ticket.

 

But using the GUID should not be an issue as I am using already this on my system and it works perfectly fine.

Avatar

Community Advisor

Hi,

you can encode an email to get a unique node name and use that as a node name.

https://www.base64encode.org/ 

Avatar

Community Advisor