Skip to Content
avatar image
Former Member

How to obtain the current portal request object ?

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!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 07, 2006 at 12:54 PM

    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.

    https://www.sdn.sap.com/irj/sdn/thread?threadID=130670&messageID=1460717>

    regards,

    Saravanan

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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();

  • avatar image
    Former Member
    Apr 07, 2006 at 01:27 PM

    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

    Add comment
    10|10000 characters needed characters exceeded