I have a PermanentPlugin, whose setUp-Method is triggered by opening a project with SiteArchitect.
Is there a way to get the corresponding ProjectEnvironment from the BaseContext-object handed over to the setUp method?
Might be solved. I don't get a ProjectEnvironment object - but the name and id of the project via:
ProjectAgent projectAgent = baseContext.requireSpecialist(ProjectAgent.TYPE);
String projectAgentName = projectAgent.getName();
long id = projectAgent.getId();
That can give me a Project object which might suffice.
What exactly are you up to? Without an application scenario it is a bit difficult to give advice. And your goal most probably will not be to get hold of a project object, or is it?
I also need the project configuration, which can be obtained via ModuleAdminAgent (as I found out just now ^^).
So it seems, there is no way to get a ProjectEnvironment object - but problem is solved for me, because the FileSystem object and Project object suffice for me.