Find the iViews, Pages and Folders assigned to Role

Hi,
Does any one has the idea about how to retrieve the worksets, pages and iviews assigned to a role.
I found a piece of code that will retrieve the roles, worksets, pages and iviews from PCD.
Here is the code, that is to retrieve the roles, worksets, pages and iviews from PCD
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
env.put(Context.SECURITY_PRINCIPAL, WDClientUser.getCurrentUser().getSAPUser());
env.put(com.sap.portal.directory.Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_ADMINISTRATION);
InitialContext initialContext = null;
DirContext dirCtx;
initialContext = new InitialContext(env);
dirCtx = (DirContext) initialContext.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);
// Gets the full path of the iViews from the PCD
NamingEnumeration ne =      dirCtx.search("","(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.iview)",     pcdSearchControls);
while (ne.hasMoreElements())
     IPcdSearchResult searchResult = (IPcdSearchResult) ne.nextElement();
     String location = "pcd:portal_content/" + searchResult.getName();
     wdComponentAPI.getMessageManager().reportSuccess("View ="+location);
// Gets the full path of the pages from the PCD
NamingEnumeration nePage = dirCtx.search("","(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.page)",pcdSearchControls);
while (nePage.hasMoreElements())
     IPcdSearchResult searchResult = (IPcdSearchResult) nePage.nextElement();
     String location = "pcd:portal_content/" + searchResult.getName();
     wdComponentAPI.getMessageManager().reportSuccess("Page ="+location);
// Gets the full path of the worksets from the PCD
NamingEnumeration neWorkSet = dirCtx.search("","(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.workset)",pcdSearchControls);
while (neWorkSet.hasMoreElements())
     IPcdSearchResult searchResult = (IPcdSearchResult) neWorkSet.nextElement();
     String location = "pcd:portal_content/" + searchResult.getName();
     wdComponentAPI.getMessageManager().reportSuccess("WorkSet ="+location);
But my requirements is, if I have the role as "Sales Role", I want to find the iViews, Pages and worksets assinged to this role.
Your help is really appreciated.
Thanks in Advance,
Chinna.

Hi,
All you need to do is to change the search root object:
DirContext dirCtx;
initialContext = new InitialContext(env);
dirCtx = (DirContext) initialContext.lookup("pcd:portal_content/mypath/myrole");
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);
all the rest stays the same.
BTW - you can also retrieve all the objects using one search by putting
(|(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.iview),(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.page),(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.workset))
In the search query. Then you can get the type using PCM (portal content model) APIs.
Hope this helps, Elisha

Similar Messages

  • I had something that help me find the last pages and recentpages I visited but I had to reinstall fox fire and it's gone how do i get it back and what was it call

    I open a new tab and recent pages, last pages and most visited pages, would be displayed but I had to uninstall fox fire then reinstall and now it gone. How do I get that back? What was it call.

    You have probably simply opened a blank Layout template which has no default text area. In Layout documents you need to add textboxes to the page.
    Just start over from the Tempalet Chooser and pick a Word Processing document (see the sidebar titles) or a template with actual content in it already.
    Peter

  • I was on an online course website, logged in and working on an assignment. Suddenly the page disappeared and was not on the tabs either. I went to the home page and tried to log back in and it said I was already logged in on another browser window

    Question
    I was on an online course website, logged in and working on an assignment. Suddenly the page disappeared and was not on the tabs either. I went to the home page and tried to log back in and it said I was already logged in on another browser window and if I proceeded to log in again the assignment I was working on would be ended and I would receive a zero. I can't locate the browser window that I was signed in on. Help...I don't want to get a zero, but don't know how to get back into the website under my original log in & get back to my half completed assignment.

    Hi,
    Please try this: In Firefox '''History''' ('''Alt''' + '''S''') and check if it is listed in either '''Recently Closed Tabs''' or '''Recently Closed Windows''' or in the list below. If you cannot find it click '''Show All History''', on the left of the window click '''Today''' below '''History''' and on the right look for the site entry corresponding closely to the time when you lost it. If you cannot see the column heading named '''Visit Date''', you may have to enable it by right-clicking on the column header strip.
    Also please note that the online course site may have redirected you to another site for the test, so it is also a good idea to look into site entries that may match the time.

  • How do I find the summary page on ITunes. Have new Windows 8 and have to change to manually manage music

    I have downloaded audiobooks from the library using Overdrive for years. I have a new computer with Windows 8 and now it's been difficult. I have a book ready to transfer to ITunes to download to my Ipod but in order to transfer it a message came up saying go to the summary page in ITunes and check Manually Mange Music.  I can't find the summary page anywhere on itUNES

    The Summary screen is what you see in the main part of the iTunes window, when you select the iPod in iTunes.
    To select the iPod in iTunes when the iTunes sidebar is NOT visible, there is a "device button" near the upper right corner of the iTunes window.  If your iPod is the only connected device, it should say "iPod."  Click it to select your iPod in iTunes.
    If the iTunes sidebar IS visible (along left side of window), the iPod appears in the sidebar, under DEVICES.  Click it there to select it.
    When the iPod is selected, there is a row of buttons that starts with Summary.  Summary should be the initially displayed screen.  That setting (a checkbox) is actually Manually manage music and videos for an iPod touch.

  • Firefox does not automatically load nor find the login page for a public network (i.e. username and password)

    To log in on a public network without a password-key (not secured), a user login is required.
    After connecting to the network, the browser, upon opening it, normally automatically loads the login page, in order to enter a username and password and connect to the internet.
    Firefox doesn't find the login page automatically, so I need to switch to google Chrome just to log in to the network.
    Does this have anything to do with user settings in the options of firefox?
    Any ideas?
    thx!

    Hi,
    You can try setting the login page as the [https://support.mozilla.org/en-US/kb/How%20to%20set%20the%20home%20page Home page] and choose to '''Show my home page''' beside '''When Firefox starts:'''.
    Alternatively, and/or to preserve your current settings you could also pin it as an always present one-click away [https://support.mozilla.org/en-US/kb/what-are-app-tabs App tab].

  • HT5557 I have bookmarks and notes that are no longer attached to the original page and I can't find a way to delete them.  Could someone help me purge these things so they are not in the way?

    I have bookmarks and notes that are no longer attached to the original page and I can't find a way to delete them.  Could someone help me purge these things so they are not in the way?

    James Ward4  Thanks for your suggestion.  I have tried the video app and it appears to have some, but not all of the downloads which are viewable without wifi, so I will now review the download process and see if I can capture the missing episodes.  Thanks again.

  • When i go to the icloud page and click find my phone, i get a box that says "can't load find my iphone.  There was a problem loading the application".  What do I do now?  Thank you

    When i go to the Icloud page and i click on find my Iphone, I get a message that says "Can't load Find my Iphone. There was a problem loading the application." What do I do now.  Thank you

    Mail has been down all morning. Pacific time. California here.
    Since 7am PST - it's 11:36 am right now. still down.
    It's a routine maintenance issue I was told. - but very frustrating not to know ahead of time.

  • Importing pages and folders into a site

    How do I import pages and folders into a site? Dreamweaver
    must be able to account for all additions and changes, so that it
    can update as appropriate. We know it is not a good idea to move
    stuff into a site via the Finder (on the Mac, for instance). But
    when I search LiveDocs, and this forum, I find no pointers for
    bringing whole pages and folders into an existing site.
    My thanks in advance, David Allen

    Copy/paste within your site's root folder. They will be there
    when you go
    to the site in DW.
    HOWEVER, if a page you are copying requires files external to
    the page,
    those files must be copied in as well. And, they must be in
    the same folder
    names that they were in prior to the copy.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "david_allen_mac" <[email protected]> wrote
    in message
    news:fqhscv$q2b$[email protected]..
    > How do I import pages and folders into a site?
    Dreamweaver must be able
    > to
    > account for all additions and changes, so that it can
    update as
    > appropriate.
    > We know it is not a good idea to move stuff into a site
    via the Finder (on
    > the
    > Mac, for instance). But when I search LiveDocs, and this
    forum, I find no
    > pointers for bringing whole pages and folders into an
    existing site.
    >
    > My thanks in advance, David Allen
    >

  • I had to change my Apple ID and password in itunes. Now my icloud doesn't work and I can't update my apps on my iPhone. I have looked at suggestions on the community pages and apple suggestions but none of them are relevant to iOS 8.1.2  icloud just

    I had to change my Apple ID and password in itunes. Now my icloud doesn't work and I can't update my apps on my iPhone. I have looked at suggestions on the community pages and apple suggestions but none of them are relevant to iOS 8.1.2
    icloud just keeps bringing up my old email address & asking for my old password which doesn't exist anymore and when I try to sign out of icloud it wants my old password, when I tried to change my primary email back to the old one it wants me to verify it through an email address that doesn't exist. Please can you help me sort out this nightmare.

    Hi skippy2012trev,
    Welcome to the Apple Support Communities!
    I understand that you updated your Apple Id and password but now you are being prompted for the old information in iCloud. You are on the right track by changing the Apple ID back to the previous email address temporarily so that you can sign out. You should not need to verify the email address. After you edit the Apple ID back to the old email address and then sign out of iCloud on your iPhone, edit the Apple ID back to the address you would currently like to use. There is no need to change the password again, only the email address, unless you prefer to update the password again.
    If you're asked for the password to your previous Apple ID when signing out of iCloud - Apple Support
    Change your Apple ID temporarily
    If signing out and back in to iMessage or FaceTime didn't help, try these steps:
    Change your Apple ID to the Apple ID you used previously. You shouldn't need to verify the email address.
    Tap Settings > iCloud. Complete these steps only if the Find My [Device] setting is turned on:
    Scroll down and tap Sign Out, then tap Sign Out to confirm. If you're using iOS 7 or earlier, tap Delete Account, then tap Delete to confirm.
    Tap Keep on My [Device] or Delete from My [Device]. In either case, your data remains in iCloud and will be updated on your device when you sign in to iCloud again.
    Enter the password for your previous Apple ID.
    Change your Apple ID to the new email address that you want to use. You'll need to verify the email address.
    Return to Settings > iCloud and sign in with your new Apple ID.
    Cheers,
    Joe

  • How do I open a new FireFox browser window to the home page and url filled?

    win 7 64-bit, firefox 5 open new window no url. When I have firefox open and open a new browser window, the new window does not open on the home page and no url is present in the address field. If I click on the favicon in the address field, the url of the current page will automatically fill in. The forward and backward arrow buttons remain disabled. In addition, links opened in a new window cause a new browser window to open, but the linked to website is not displayed in the new windows. What is displayed is a new window completely blank with no url in the address bar. I tried to include troubleshooting information by clicking on the copy to clipboard, but apparently the character count was exceeded.

    I disabled all plug-ins and extensions. the problem has been resolved. Now I will enable each one individually to find out which one was the offender.

  • Issue in Customizing the Logon Page and Replacing the Logon Panel Image

    I have facing problem in Customizing the Logon Page and Replacing the Logon Panel Image in Hyperion Workspace 11.1.2.1. I have tried multiple time.
    First Replacing the Logon Panel Image. I have following the steps given in admin guide of EPM workspace on page 25 and they are as follow
    To replace the image that is displayed on the logon panel:
    1 Create an image file named logon_panel.gif with dimensions that match previous image.
    2 Rename the installed version of logon_panel.gif to logon_panel.gif.original in
    %EPM_ORACLE_HOME% /common/epmstatic/bpmui/themes/<do for each
    theme>/images_global. Move the logon_panel.gif file that you created in step 1 to this
    directory.
    3 Clear your browser cache.
    Note: You do not need to restart the Hyperion Foundation Services - Manager Server.
    But still I am getting the same default image on log in page.
    The other problem I am facing is Customizing the Logon Page.
    I am following the steps given in admin guide of EPM workspace on page 17 and they are as follow:
    To customize the logon page:
    1 Follow instructions in the topic Extract a file in the Workspace Web Application.
    2 Backup file <temp directory>/war/WEB-INF/lib/bpmui.jar.
    3 Extract the contents of <temp directory>/war/WEB-INF/lib/bpmui.jar to <temp
    directory>/bpmui_jar/.. (*)
    4 Backup file <temp directory>/bpmui_jar/WEB-INF/classes/com/hyperion/bpm/
    Resources_en.properties.
    5 Edit file <temp directory>/bpmui_jar/WEB-INF/classes/com/hyperion/bpm/
    Resources_en.properties.
    6 Search for the property bpm.logonCopyright.
    Customizing the Logon Page 17
    7 Modify the text to the right of the equal sign. Use \n to get a new line.
    8 Save your changes.
    9 Repeat step step 1 through step step 8 for all the other Resources_xx.properties files for other
    locales.
    10 Jar the contents of <temp directory>/bpmui_jar/ to <temp directory>/war/WEBINF/
    lib/bpmui.jar.
    11 Continue with the topic, Re-package a file inside the Workspace Web Application.
    For the first part I am following
    Extract a file in the Workspace Web Application
    ä To extract files in Workspace Web Application:
    1 Stop the service for Hyperion Foundation Services - Managed Server.
    2 Backup file <EPM_ORACLE_HOME>/products/Foundation/workspace/
    InstallableApps/workspace.ear.
    16 Administration Tools and Tasks
    3 Using an unarchiving utility, extract the contents of <EPM_ORACLE_HOME>/products/
    Foundation/workspace/InstallableApps/workspace.ear into a <temp
    directory>.
    4 Create <temp directory>/war.
    5 Extract the contents of <temp directory>/workspace.war into <temp directory>/
    war.
    6 Update the file you are patching under <temp directory>/war. as direct in it.
    But I am not able to find file bpmui.jar in step 3 of above one (*). I have marked for your connivance.
    I am able to see these file in that directory
    dynamichelp.jar
    workspace.jar.
    Can anyone provide help on this. Platform I am using is LINUX

    You seem to have posted this in the wrong forum. This forum is for Oracle Enterprise Manager - not Hyperion.

  • I have stored everything on my Macbook pro in a external hard drive (Time Machine)  Now that we have "wiped the machine" I am told I can start it over and load ontent--apps, docs, etc from the hard drive, just plug it in, find the time machine and what?

    I have stored everything on my Macbook pro in a external hard drive (Time Machine)  Now that we have "wiped the machine" I am told I can start it over and load ontent--apps, docs, etc from the hard drive, just plug it in, find the time machine and what?    I need to know what to highligh, what to click on. 

    hirogliffix,
    take a look at this Apple page — in particular, the “Restoring data from Time Machine backups” section and its “Restoring your entire system from a backup” subsection.

  • I have just upgraded to the new OS X V. 10.10.3 but cannot access my iCloud Drive documents using the resident Pages and Numbers software on my MacBook Pro. Help needed.

    I have just upgraded to the new OS X V. 10.10.3 but cannot access my iCloud Drive documents using the resident Pages and Numbers software on my MacBook Pro. Help is needed to access those documents using the resident software on my MacBook Pro rather than the Beta software on iCloud.com.

    I have iCloud Drive set on the Finder sidebar and use that to open the Numbers Spreadsheet on iCloud.
    OSX 10.10.3
    Best.

  • Has anyone downloaded Yosemite and found that there are no ore scroll bars? I have to move the window (of any window, Skype window, browser window etc.) in order to find the scroll bar and then it disappears so fast I can't even use it.

    Has anyone downloaded Yosemite and found that there are no ore scroll bars? I have to move the window (of any window, Skype window, browser window etc.) in order to find the scroll bar and then it disappears so fast I can't even use it.

    Not sure why that was unchecked but good to know!
    Apple's new default (since at least a couple of OS releases back) is to have it off so OS X matches the behavior of an iPhone or iPad.
    I almost never need a scroll bar, and when I do, I just move over to the edge of the window when scrolling and a larger scroll bar appears.
    Yes, for the most part, users don't really need the scroll bar. That's what the scroll wheel on almost all mice is for. Saves the trip over to bar to physically grab and move it. But, I do like it on all the time regardless. That way (especially with a long article) I can just take a quick glance over to the bar to see about where I am on the page (a third of the way down? halfway?). Otherwise, I have to move the page just to make it appear to give me the same information.

  • Where can I find the install page for CS5 Production Premium?

    I need to reinstall my copy of CS5 Production Premium. Where can I find the install page for that?

    Check your Adobe account online to see if there is a link to download from there.
    Alternately, you can download the trial version of the software thru the page linked below and then use your current serial number to activate it.
    Be sure to follow the steps outlined in the Note: Very Important Instructions section on the download pages at this site and have cookies enabled in your browser or else the download will not work properly.
    CS5: http://prodesigntools.com/all-adobe-cs5-direct-download-links.html

Maybe you are looking for