kai1
I'm new here

Is there a way to get a ProjectEnvironment from BaseContext

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?

0 Kudos
3 Replies
kai1
I'm new here

Re: Is there a way to get a ProjectEnvironment from BaseContext

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.

0 Kudos
StefanSchulz
I'm new here

Re: Is there a way to get a ProjectEnvironment from BaseContext

Hey Kai,

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?

Best regards

Stefan

0 Kudos
kai1
I'm new here

Re: Is there a way to get a ProjectEnvironment from BaseContext

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.

0 Kudos