08-11-2021 03:40 AM
Hi,
I'm using ACS 5.2 and I want to fix a path of some folders at startup because a ImporterModuleComponent use the path to be fix.
I created a new implementation of a AbstractModuleMomponent to rename the folders with fileFolderService.rename(myNode, "my-new-name").
But the new name of the folder is not the name a passed in parameters to fileFolderService.rename() but a UUID.
I alse tried to re-apply the name with setProperty (the wrong way) but my node do not take this name either. (See the logs)
Any idea why this is happening ? Is this related to AbstractModuleComponent and some side effect related to that ?
Thank's
08-11-2021 06:10 AM
Could you please go through Node browser and check which properties has that UUID?
08-11-2021 06:24 AM
This is the nodeId (created by a BootstrapView) :
08-11-2021 10:45 AM
08-11-2021 10:55 AM
This should help you
08-11-2021 11:26 AM
08-12-2021 04:14 AM
There is the folowing tests I ran:
I created a file MyTextFile.txt
I used fileFolderService.rename() on this file => It has been renamed correctly
I used fileFolderService.rename() on my folder with a custom uuid of "cpage-folder" (not a real uuid) => the folder has been renamed with a new uuid as name
Logs of the 1st test :
Node has been renamed (fix path): workspace://SpacesStore/90bd49cc-e777-4e0a-a264-40c17e10407e [oldName=MyTextFile][newNameToApply=TheNewName] --> newNameOfTheNode=TheNewName 2021-08-12 09:00:18,767 INFO [bootstrap.modules.FixNodePathModuleComponent] [localhost-startStop-1] Node has been renamed (fix path): workspace://SpacesStore/cpage-folder [oldName=Dictionnaire CPage][newNameToApply=cpage-folder] --> newNameOfTheNode=fe4cb5e2-95d5-412d-9391-2e4d4dec8254 2021-08-12 09:00:18,790 INFO [bootstrap.modules.FixNodePathModuleComponent] [localhost-startStop-1] Node has been renamed (fix path): workspace://SpacesStore/cpage-referentiels-folder [oldName=Referentiels][newNameToApply=cpage-referentiels-folder] --> newNameOfTheNode=67aeb5e1-563f-47a0-8693-b4597a6f9923 2021-08-12 09:00:18,832 INFO [bootstrap.modules.FixNodePathModuleComponent] [localhost-startStop-1] Node has been renamed (fix path): workspace://SpacesStore/cpage-referentiels-pc-folder [oldName=PC][newNameToApply=cpage-referentiels-pc-folder] --> newNameOfTheNode=b99846e8-3537-4906-80f5-6f341565dfb6 2021-08-12 09:00:18,867 INFO [bootstrap.modules.FixNodePathModuleComponent] [localhost-startStop-1] Node has been renamed (fix path): workspace://SpacesStore/cpage-referentiels-pj-folder [oldName=PJ][newNameToApply=cpage-referentiels-pj-folder] --> newNameOfTheNode=a158cb9a-37e3-4afd-b00f-4f4866ec28a9 2021-08-12 09:00:18,889 INFO [bootstrap.modules.FixNodePathModuleComponent] [localhost-startStop-1] Node has been renamed (fix path): workspace://SpacesStore/cpage-synchro-permissions-folder [oldName=Synchronisation permissions][newNameToApply=cpage-synchro-permissions-folder] --> newNameOfTheNode=1e6c1da2-e2ae-4ab9-828c-3fc92e677090
I cleared the database.
I created a file MyTextFile.txt
I created a folder MyFolderTest
I used nodeService.setproperty() on ContentModel.PROP_NAME on the file => the file has been renamed correctly (but the path is wrong)
I used nodeService.setproperty() on ContentModel.PROP_NAME on the folder => the folder has been renamed correctly (but the path is wrong)
I used nodeService.setproperty() on ContentModel.PROP_NAME on my custom folder that contains a uuid of "cpage-folder" => the folder has NOT been renamed
Logs of the 2nd test :
2021-08-12 09:59:35,664 INFO [bootstrap.modules.FixNodePathModuleComponent] [localhost-startStop-1] Node has been renamed (fix path): workspace://SpacesStore/b666309f-6180-4fc1-bfbe-fb12e7ee6f04 [oldName=MyTextFile][newNameToApply=TheNewName] --> newNameOfTheNode=TheNewName 2021-08-12 09:59:35,680 INFO [bootstrap.modules.FixNodePathModuleComponent] [localhost-startStop-1] Node has been renamed (fix path): workspace://SpacesStore/b221a434-4113-4851-b822-50432e70a71a [oldName=MyFolderTest][newNameToApply=TheNewFolderName] --> newNameOfTheNode=TheNewFolderName 2021-08-12 09:59:35,689 INFO [bootstrap.modules.FixNodePathModuleComponent] [localhost-startStop-1] Node has been renamed (fix path): workspace://SpacesStore/cpage-folder [oldName=Dictionnaire CPage][newNameToApply=cpage-folder] --> newNameOfTheNode=Dictionnaire CPage 2021-08-12 09:59:35,695 INFO [bootstrap.modules.FixNodePathModuleComponent] [localhost-startStop-1] Node has been renamed (fix path): workspace://SpacesStore/cpage-referentiels-folder [oldName=Referentiels][newNameToApply=cpage-referentiels-folder] --> newNameOfTheNode=Referentiels 2021-08-12 09:59:35,700 INFO [bootstrap.modules.FixNodePathModuleComponent] [localhost-startStop-1] Node has been renamed (fix path): workspace://SpacesStore/cpage-referentiels-pc-folder [oldName=PC][newNameToApply=cpage-referentiels-pc-folder] --> newNameOfTheNode=PC 2021-08-12 09:59:35,705 INFO [bootstrap.modules.FixNodePathModuleComponent] [localhost-startStop-1] Node has been renamed (fix path): workspace://SpacesStore/cpage-referentiels-pj-folder [oldName=PJ][newNameToApply=cpage-referentiels-pj-folder] --> newNameOfTheNode=PJ 2021-08-12 09:59:35,711 INFO [bootstrap.modules.FixNodePathModuleComponent] [localhost-startStop-1] Node has been renamed (fix path): workspace://SpacesStore/cpage-synchro-permissions-folder [oldName=Synchronisation permissions][newNameToApply=cpage-synchro-permissions-folder] --> newNameOfTheNode=Synchronisation permissions
Thanks
09-30-2021 08:01 AM
Hi,
Can I have a feedback on this issue please?
Thank's
09-30-2021 10:33 AM
10-01-2021 09:01 AM
Hi,
You can acces my bootstrap-context.xml here: https://pastebin.com/SZwUAek1
And my FixNodePathModuleComponent.java here: https://pastebin.com/AT0Bfmgz
Tell me if you need anything else to test this behavior.
Thank's
Explore our Alfresco products with the links below. Use labels to filter content by product module.