Site Manager Developer Manual / Version 2207
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
FolderModel
which 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
ResourceModel
of the searched resource or null if the resource does not exist.