Site Manager Developer Manual / Version 2304
Table Of ContentsQuestion:
How can I access arbitrary resources?
Answer:
Get the root folder of the repository:
FolderModel rootFolder=Editor.getEditor().getResourceFactory.getRootFolder();This returns a
FolderModelwhich can be used for further processing.
Get the resource you are looking for:
ResourceModel myResource=rootFolder.pathLookup(new String []({"myFolderName", "myDocumentName"}));or
ResourceModel myResource=rootFolder.pathLookup(new String("myFolderName/myDocumentName"));This will return a
ResourceModelof the searched resource or null if the resource does not exist.


