How can I fetch all the PCD roles from EP!

Hello,
I need to fetch all the available pcd roles in EP. Right now I am trying to fetch pcd roles under Portal Content directory. I need a clarification whether this is the only place the pcd roles are available or is there any other location where rest of the pcd roles are available?
Thanks in advance,
Prashanth V Swamy

Hi Prasanth,
See the code below to retrieve all the pcd roles.
public List getPCDContents(IPortalComponentRequest request) throws Exception{
               try{
                    Hashtable env = new Hashtable();
                    env.put(IPcdContext.SECURITY_PRINCIPAL, request.getUser());
                    env.put(Context.INITIAL_CONTEXT_FACTORY,IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
                    env.put(com.sap.portal.directory.Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);
                    InitialContext ctx = null;
                    DirContext dirCtx;
                    List roleList = null;
                    ctx = new InitialContext(env);
                    dirCtx = (DirContext) ctx.lookup("pcd:portal_content/");
                    PcdSearchControls pcdSearchControls = new PcdSearchControls();
                    pcdSearchControls.setReturningObjFlag(false);
                    pcdSearchControls.setSearchScope(
                         PcdSearchControls.SUBTREE_WITH_UNIT_ROOTS_SCOPE);
                    dirCtx.addToEnvironment(
                         Constants.APPLY_ASPECT_TO_CONTEXTS,
                         Constants.APPLY_ASPECT_TO_CONTEXTS);
                    NamingEnumeration ne =
                         dirCtx.search("","(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.role)",
                              pcdSearchControls);
                    iViewList = new ArrayList();
                    while (ne.hasMoreElements()) {
                         IPcdSearchResult searchResult =
                              (IPcdSearchResult) ne.nextElement();
                         String location = "pcd:portal_content/" + searchResult.getName();
                         //Get the full pcd path of the iview.
                         roleList.add(location);
                    return iViewList;
               }catch(Exception e ){
                    throw new Exception(e);
Hope it helps.
Regards,
Karthick

Similar Messages

  • How can I clean all the junk files from my iMac so that it can run faster?

    How can I clean all the junk files from my iMac so that it can run faster? Its been slowing down ever since I started using it.

    Before doing anything, we might be able to help with your iMac issues here.
    Please download, install and run Etrecheck.
    http://www.etresoft.com/etrecheck
    Copy/paste its report here in another reply thread so that we have a complete profile of your Mac's hardware and installed software.

  • How can I have all the numbers transfered from my old cellphone?

    In my old cell phone I have more than one number for each person: cell phone, land line, office etc. When I have transfered my telephone contacts from my old cell phone to my iphone, only one number for each name appears : how can I have all the numbers transfered?

    When transfer contacts through SIM only the first number is really transferred.
    What kind is your old phone?

  • How can I transfer all the apps purchased from one account to another?

    Good day,
    I'm just wonderin' can I transfer all the apps purchased from my old account to a newer one?

    No, apps (plus other content bought from Apple such as music and films) are tied to the account that bought / downloaded them and they can't be copied or transferred to a different account.

  • How can I get ALL the user info from WWW_FLOW_FND_USER -table?

    Hi.
    I use HTML DB authentication and therefore all my user information is stored in HTML DB tables. I can use :APP_USER to get USER_NAME, but in my application I need to have also USER_ID, FIRST_NAME, LAST_NAME and EMAIL_ADDRESS fields from database. I don't want to change any database/schema security level so I cannot read directly from WWW_FLOW_FND_USER -table when I am inside in SCOTT -schema/sec.level.
    How to read all the information?

    Thank you for your help, but I cannot find any information about backage wwv_flow_user_api on OTN or in HTML DB documentation.
    Where to start?

  • How can I copy all the itunes content from my pc to my new MAC?

    I just bought a MacBook pro new .
    I had all the library, books, podcasts, music, etc in my PC, and  I want to move all that to my new Mac.
    <How can I do that easily?
    Thanks!

    Welcome to the Apple Support Communities
    It's easy to do that. Just follow these steps to transfer your iTunes library from your PC to the Mac > http://support.apple.com/kb/ht1751 (You have to do the “Restoring your iTunes Library backup” step on the Mac)

  • How can I print all the open tabs from the Reader?

    One of my users subscirbes WSJ Online and uses the Reader to read articles. The user would like to know if he can print all the open tabs in Reader at once instead of one tab or article at a time.
    OS X10.8.2

    Hi,
    Do you mean that you want to print the ABAP code to SAPscrip form ?
    Svetlin

  • My Laptop with Synced Firefox crashed and i had to do a fresh install, how can i retrieve all the synced data from the Mozilla Servers

    I had set up Firefox sync on my Windows 7 Laptop which crashed and I had to reinstall windows. I used to be able to share content with my Firefox synced Android too. Is there a way i can retrieve the synced data from the Mozilla servers? I tried to set up sync on my new installation on a Mac 10.6 but when i click on Set-up Sync it asks me:
    # Set-up new sync account (i already have one)
    # I already have a sync account
    When i select the second option it tells me to Add a device. I went in the "Sync Options" and tried the replace all data on this computer with my sync data, but nothing happened. When i try to connect from my Android it also asks me to add a device with the 3 boxes with letters in them.
    So in both the cases it is asking me to "Add a device" but i cannot connect to my sync account in either case to sync data from there

    Please search the forums. This has been covered here extensively.

  • How can I remove all the drawing canvases from a Word file?

    Hi,
    There are many drawing canvases in the document, which were created by pressing 'edit' on embedded EMF files.
    I would like to replace the embedded figures with object references, so I searched for a way to delete all the drawing canvases but couldn't find the result.
    Is there a macro that will delete all the drawing canvases in the document? Or, is the drawing canvas defined as an object type at all?
    Thanks in advance.

    Hi,
    According to your description, do you want to change the shapes or other content's figures with object references of the drawing canvases in Word?
    If you need to use a macro, I recommend you post the question to MDSN forum for Word:
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=worddev&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support

  • How can i fetch only the updated contacts from SQLServer to local SQLite database?

    Hi,
    I need to update my local AIR Contact application (HTML/AJAX) with the new contacts from the SQL Server (interacting with J2EE).
    How can i do it?
    Do, i have to create a background thread which Pulls (requests) data periodically, and the server response is an XML file with sql scripts? If yes, How can i do this. Is there an sample application whose source i can look at?
    Thanks.

    Hi,
    I need to update my local AIR Contact application (HTML/AJAX) with the new contacts from the SQL Server (interacting with J2EE).
    How can i do it?
    Do, i have to create a background thread which Pulls (requests) data periodically, and the server response is an XML file with sql scripts? If yes, How can i do this. Is there an sample application whose source i can look at?
    Thanks.

  • When i open a pdf from any website to read , firefox automatically downloads to the hadr disk, safari does not do this. how can i stop all the clutter resulting from these downloads

    as above ,

    The text editor is the text area that you use on the webmail (Yahoo, Hotmail) website to create a new mail.
    You can compare that with the ''Post new message'' text area that you use to create a new post on this forum.
    Just above the text area that you use to enter the message text there is usually a button bar with buttons that allows some text formatting like Bold and Italic and can also include a button to make a clickable hyperlink.
    Check the tooltip of each button by hovering with the mouse over each button.
    Make Link - https://addons.mozilla.org/firefox/addon/142

  • How can I clear all the audio clips from the tracks at once in multi-track?

    Just switched to CS and trying to find shortcut to clearing all of the audio from all of the tracks when I am doing a multi-track session.  Thanks for any help.

    THANKS that's what I was looking for
    Whitey Whitney
    Production Director
    Wilks Broadcasting - Kansas City
    KMXV, KBEQ, KFKF, KCKC
    508 Westport Rd.  Suite 202
    Kansas City, MO.  64111
    816-753-4000

  • How can I get all the e-mails from my six e-mail addresses to go to one inbox

    I would like to have just one inbox for all my e-mails, rather then the current six.

    http://kb.mozillazine.org/Global_Inbox

  • How can i print all the contect of the code in sapscript window ? ?

    how can i print all the contect of the code in sapscript window ? ?

    Hi,
    Do you mean that you want to print the ABAP code to SAPscrip form ?
    Svetlin

  • How can i print all the tab pages not just the first page (tab)

    how can i print all the tab pages not just the first page (tab)

    You would need to do this programmatically. Here's one way:
    Attachments:
    Example_VI_BD6.png ‏3 KB

Maybe you are looking for

  • How do i fix a dead spot at the bottom of an ipod touch?

    I have a dead spot at the bottom of my screen. I can swipe, put my password in, and slide through the home pages. However, I am unable to select either of the original four menu options (Messages, Safari, Settings, or Music). I dont know what to do,

  • Import from camera not showing preview images

    When I import from my DSLR, I see empty boxes representing all the images on the card but no preview. I'm set to import JPEG and the images are JPEG. I have the option Do Not Import Duplicates turned off. I've tried restarting Aperture (3.1) and even

  • Connecting 2 macs

    Hope this in the right area. I've got a friend with a 1.83ghz intel macbook (tiger) and I've got a G5 imac (leopard). The macbook came up with the dreaded question mark at startup. Everytime you put the software disc in hardware test/ disk utility is

  • Row level access, virtual private database, label security

    Hello All, I'm experiencing an issue.... I've a datawarehouse where some tables, for examples orders are shared for two different countries. Difference is made simply with a field country may contain country_id. So using OBI and publisher I need to p

  • Include a html page in another html page

    How do I include a html page in another html page? I have 7 separate page making up a website. I made a separate page for the bottom navigation which I want to include for each page. Instead of making up a separate nav bar for each page. Thanks for y