Hello,
I developed some portal Components that make use of the usermapping facilities of SAP EP by defining a System like the following (in portalapp.xml)
<component name="PirobaseSystemTemplate">
<component-config>
<property name="ClassName" value="" />
</component-config>
<component-profile>
<property name="com.sap.portal.pcm.Title" value="PirobaseSystemTemplate" />
<property name="ComponentType" value="com.sapportals.portal.system" />
<property name="logonmethod" value="UIDPW" />
<property name="usermappingtype" value="">
<property name="validvalues" value="4/user5/admin10/admin,user" />
<property name="category" value="UserManagement" />
<property name="personalization" value="NON-DIALOG" />
<property name="type" value="String" />
</property>
....
</component-profile>
</component>
I would like to define some arbitrary properties e.g like the following:
<property name="server" value="10.11.1.210" />
that might by customized by a system administrator.
Now I wonder how I can read these properties from a portal component (e.g. an AbtractPortalComponent or a PageProcessorComponent) analog to the component's own profile.
Thanks for any hint.
Regards
Torsten
See Java examples in portal. If I am not wrong, sample 3 does this.
You must install Java SDK business package and assign yourself Java role.
Regards
Vitaliano
IPortalComponentProfile profile = request.getComponentContext().getProfile();
profile.getProperty("server");
Hi Vitaliano,
thanks for your help.
Unfortunately, your answer is not what i was looking for. I know how to read the profile properties from a portal component itself, and i also know how to retrieve mapped user credentials for a specific portal backend System (created on a template as i gave) from some portal component (by implementing an AbstractBackendConnection). But i don't know how to read the profile of the portal SYSTEM that i use to get mapped credentials from this portal component that uses the system.
So my precise question is: How can I read profile properties of a portal System from another portal component that uses this portal System. I tried around with using a landscape service retrieved from the PortalRuntime, but without success.
Best regards
Torsten
I found the solution using the EP5 backwards compability landscape API:
ILandscapeService ls = (ILandscapeService) PortalRuntime.getRuntimeResources().getService(ILandscapeService.KEY);
ISystem system = ls.getSystem("<the systems alias>");
String attribute = system.getAttribute("<the property key in portalapp.xml>"));
Regards
Torsten
Add a comment