cancel
Showing results for 
Search instead for 
Did you mean: 

How to obtain the current portal request object ?

Former Member
0 Kudos

How to obtain the current portal request object (the request from the Portal to the Repository Manager)

in the Repository Manager.

please help !

It's very urgent....

I am looking for this for the last 1 week....

I am working on EP6.0 SP9

using Repository Framework

Thanx in advance!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi manish,

I am not able to understand your query properly.But i hope the following code will help you.

a) First make sure to import

1.com.sapportals.portal.prt.component.IPortalComponentRequest;

2.com.sapportals.portal.prt.component.IPortalComponentResponse;

b)

IPortalComponentRequest request =				(IPortalComponentRequest) this.getRequest();
IUser user = (IUser) request.getUser().getUser();
ResourceContext ctxt = new ResourceContext(user);
RID rid = RID.getRID("/documents");
IResource resource =ResourceFactory.getInstance().getResource(rid, ctxt);
IRepositoryManager manager=resource.getRepositoryManager();

Regards,

Srinath

Saravanan_SD
Advisor
Advisor
0 Kudos

Hi Manish,

Can u explain your problem clearly. mayb ur code snippet where u wish to get the user.

You can get the user by

IPortalComponentRequest request =	
			(IPortalComponentRequest) this.getRequest();
IUser user = (IUser) request.getUser();

As mentioned in this thread.

<a href="http://">https://www.sdn.sap.com/irj/sdn/thread?threadID=130670&messageID=1460717</a>

regards,

Saravanan

Former Member
0 Kudos

Hi Sarvana,

Thanx for the code!

But the problem here is I am using Repository Framework

to connect to a content server. Now here the main block is the Repository Manager.

I want to retrieve the portal user who has logged into the portal to retrieve the corresponding Content Server user and then Log into the system.

The code where I need the the request object to use the request object to retrieve the user.

public class ACEPRepositoryManager extends AbstractManager implements IReconfigurable{

private static Location logger = Location.getLocation(com.filenet.acep.ACEPRepositoryManager.class);

private static final Set supportedOptions = new HashSet();