hi all,
In the PCD Filter factory implementation method . i am using the following code
public Object getObjectInstance(Object arg0, Name arg1, Context arg2, Hashtable env)
throws Exception
{
if (Constants.ASPECT_NAVIGATION.equals(env.get(Constants.REQUESTED_ASPECT)))
{
IUser user = (IUser) env.get(IPcdContext.SECURITY_PRINCIPAL);
String department="null";
if (user != null)
{
department=user.getDepartment();
if ((department != null) && (!department.equals("")))
{
filterExpression = "(" + FilterDepartmentService.Department_ATTRIBUTE_KEY + "=" + department + ")";
}
}
}
return filterExpression;
}
but i cannot able to get the current user. how to get the current user in the above method..
Regards,
Shanthakumar.