on 05-05-2006 5:47 AM
Hi All,
planning to use Dynamic System Resolution feature,just found help document in SAP Help portal:
http://help.sap.com/saphelp_nw04s/helpdata/en/03/83d1413f389c39e10000000a155106/frameset.htm
and developed a portal service
src.api:
-
import com.sapportals.portal.prt.service.IService;
public interface IMyAliasMapping extends IService
{
public static final String KEY = "MyAliasMapping";
}
src.core:
-
developed two class here:
-
1.IDynamicSystemService.java
package com.test;
public interface IDynamicSystemService {
public abstract String getAlternativeSystem(IUser user, String alias);
}
2.MyAliasMapping.java
package com.test;
import com.sapportals.portal.prt.service.IServiceContext;
import com.sapportals.portal.prt.service.IServiceConfiguration;
public class MyAliasMapping implements IDynamicSystemService, IMyAliasMapping{
private IServiceContext mm_serviceContext;
/**
Generic init method of the service. Will be called by the portal runtime.
@param serviceContext
*/
public void init(IServiceContext serviceContext)
{
mm_serviceContext = serviceContext;
}
/**
This method is called after all services in the portal runtime
have already been initialized.
*/
public void afterInit()
{
}
/**
configure the service
@param configuration
*/
public void configure(IServiceConfiguration configuration)
{
}
/**
This method is called by the portal runtime
when the service is destroyed.
*/
public void destroy()
{
}
/**
This method is called by the portal runtime
when the service is released.
*/
public void release()
{
}
/**
@return the context of the service, which was previously set
by the portal runtime
*/
public IServiceContext getContext()
{
return mm_serviceContext;
}
/**
This method should return a string that is unique to this service amongst all
other services deployed in the portal runtime.
@return a unique key of the service
*/
public String getKey()
{
return KEY;
}
/**
The service must implement this method, which is called by the
System Landscape in order to get a system for the specified alias.
@param user the current user
alias the alias to resolve
@return the PCD path to a system
*/
public String getAlternativeSystem(IUser user, String alias)
{
//String system = null;
String system = "pcd:portal_content/Dev1CLNT100";
return system;
}
portalapp.xml:
-
<?xml version="1.0" encoding="utf-8"?>
<application>
<registry>
<entry path="/runtime/alias.mappers/SAP_R2" name="MyAliasMapping" type="service"/>
</registry>
<application-config>
<property name="releasable" value="false"/>
<property name="startup" value="true"/>
<property name="ServicesReference" value="com.sap.portal.ivs.api_dynamicSystemService"/>
</application-config>
<components/>
<services>
<service name="MyAliasMapping">
<service-config>
<property name="className" value="com.test.MyAliasMapping"/>
<property name="startup" value="true"/>
</service-config>
</service>
</services>
</application>
i did not get any error, and upload in the portal as per the help document checked in the registry and i found the System alias registered with my custom portal service.
but when i click an iview which as the above system alias its not pointed to system which i am returning in the getAlternativeSystem method,it seems to me that my service is not at all called?
can any body suggest me whats the problem with my code?
or did i missed any thing?
found one web blog from Daniel but even tried his code too , same thing??
advance thanks for all helps....
Cheers
indira
Message was edited by: indirap
Message was edited by: Indira p
Hi Indira,
Did you find any solution for this?
Regards,
Uday.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Indira,
Any success?I also have same issue.
Please let me know.
Regards
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.