Hi all
We have modified the Portal Page and implemented the DSR routines..
And we deployed and we are able to see the system Alias being Registered in the Portal Run Time ...
But our System Resolving Service is not being called !!!
When I click an iview which as the below system alias its not pointed to system which iam returning in the getalternativesystem method, it seems to me that my service is not at all called??
Here is the DSR routine
Portalapp.xml
<?xml version="1.0" encoding="utf-8"?>
<application>
<components/>
<registry>
<entry path="/runtime/alias.mappers/DynamicSystem"
name="DynamicSystemAliasMapping" type="service"/>
</registry>
<application-config>
<property name="releasable" value="false"/>
<property name="startup" value="true"/>
<propert name="ServiceReference"
value="com.sap.portal.ivs.api_dynamicSystemService"/>
</application-config>
<services>
<service name="DynamicSystemAliasMapping">
<service-config>
<property name="className" value="com.cvg.dynamicsystem.DynamicSystemAliasMapping"/>
<property name="startup" value="true"/>
</service-config>
</service>
</services>
</application>
IDynamic SystemService.java
package com.cvg.dynamicsystem;
import com.sap.security.api.IUser;
/**
@author sramalin
*
To change the template for this generated type comment go to
Window>Preferences>Java>Code Generation>Code and Comments
*/
public interface IDynamicSystemService {
public abstract String getAlternativeSystem(IUser user, String alias);
}
DynamicSystemAliasMapping.java
package com.cvg.dynamicsystem;
import com.sap.security.api.IGroup;
import com.sap.security.api.IGroupFactory;
import com.sap.security.api.IPrincipal;
import com.sap.security.api.IRole;
import com.sap.security.api.IRoleFactory;
import com.sap.security.api.IUser;
import com.sap.security.api.UMException;
import com.sap.security.api.UMFactory;
import com.sapportals.portal.prt.service.IServiceContext;
import com.sapportals.portal.prt.service.IServiceConfiguration;
import com.sapportals.portal.prt.service.IService;
public class DynamicSystemAliasMapping implements IDynamicSystemAliasMapping,IDynamicSystemService{
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
@deprecated
*/
public void configure(com.sapportals.portal.prt.service.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.
@deprecated
*/
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;
return (checkUser(user));
}
/**
This method is not part of the interface and is provided in order
to isolate the logic for selecting a system for a specific alias. This
logic could have been placed in the getAlternateSystem() method.
@return the PCD path for a system, or null
*/
public String checkUser(IUser user) {
/* Check which group user is from */
if (user.getFirstName().equalsIgnoreCase("Bruce"))
return "pcd:portal_content/com.solectron.systems/Dynamic_System_1";
else if (user.getFirstName().equalsIgnoreCase("Sridhar"))
return "pcd:portal_content/com.solectron.systems/Dynamic_System_2";
else
return null;
}
}
Please need immediate Help !!!! .I am very new EP.
Thanks