valid Name is getting truncated while using JcrUtil.createValidName()

Avatar

Avatar

vineethg1916261

Avatar

vineethg1916261

vineethg1916261

18-07-2019

I am using JcrUtil.createValidName()API to create a valid node name for assets. JcrUtil.createValidName()is returning a valid node as  “myfile_document_brandpdfc240676828additionalfeatureshelp08185555” for all below strings. The values are getting truncated(_V1) after 64 chars.

MyFile_Document_Brand_PDF_C24067_6828_Additional_Features_Help_08185555_V1

MyFile_Document_Brand_PDF_C24067_6828_Additional_Features_Help_08185555_V9

MyFile_Document_Brand_PDF_C24067_6828_Additional_Features_Help_08185555_V13

Could someone help me to avoid truncation with similar functionality?

Here is code snippet:

String fileName="MyFile_Document_Brand_PDF_C24067_6828_Additional_Features_Help_08185555_V1";
String nodeName=JcrUtil.createValidName(fileName,JcrUtil.
HYPHEN_LABEL_CHAR_MAPPING);

API Reference:

https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/javadoc/co...

View Entire Topic

Avatar

Avatar

vineethg1916261

Avatar

vineethg1916261

vineethg1916261

26-07-2019

Thanks arunpatidar26 . We have written custom code