Forum Stats

  • 3,873,311 Users
  • 2,266,532 Discussions
  • 7,911,502 Comments

Discussions

I want to get desktopPath and portalPath

668596
668596 Member Posts: 48
edited Nov 12, 2008 9:17PM in WebLogic Portal
desktopPath and portalPath ,how I can get it in portlet or other places!
I need it because I want to make a new visitor tools.
Tagged:

Answers

  • 669362
    669362 Member Posts: 80
    Hi,

    WLP 10.2 : u can use this class : com.bea.netuix.servlets.manager.AppContext with methods getDesktopPath() and getPortalPath()

    Emmanuel
  • 653587
    653587 Member Posts: 5
    Hi,

    Can you let me know how to create a desktop using IPortalDefinitionManager and IDesktopDefinitionManager

    Regards
    Lakshmi
  • 669641
    669641 Member Posts: 6
    Hi Lakshmi. You're going to want to do something like the following. You will need to know the definition IDs for the book, look & feel, and shell you want to use for the desktop as well.

    /*** CREATE PORTAL ***/

    CustomizationContext cc = new CustomizationContext(locale, request);

    LocalizationResource lResource = new LocalizationResource(locale, title, description);

    PortalPath portalPath = PortalPath.createPortalPath(portalPathName);
    PortalDefinition portalDef = new PortalDefinition(webappName, portalPath, lResource, contentUri);
    PortalDefinitionManager pdm = //** get ejb **//
    portalDef = pdm.createPortalDefinition(cc, portalDef);

    /*** CREATE DESKTOP ***/

    DesktopPath desktopPath = DesktopPath.createDesktopPath(desktopPathName);
    DesktopDefinitionId desktopId = DesktopDefinitionId.createDesktopDefinitionId(webappName, portalPath, desktopPath)
    LocalizationResource lResource = new LocalizationResource(locale, title, description);

    DesktopDefinition desktopDefinition = desktopDefinition = new DesktopDefinition(desktopId, lResource,
    MarkupDefinition.MARKUP_DESKTOP_ID,
    mainBookDefinitionId,
    lookAndFeelId, shellId, treeOptimizationEnabled,
    DesktopType.DesktopTypeValue.NORMAL, isTemplate, isGlobal);


    DesktopDefinitionManager desktopDefinitionManager = /** CREATE ejb **/
    desktopDefinitionManager.createDesktopDefinition(cc, desktopDefinition);


    Hope this helps.

    Jeff Mueller

  • 668596
    668596 Member Posts: 48
    if I use AppContext in portlet,then I get the DeskTopPath is null,I don't know why?
    AppContext ac = AppContext.getAppContext(request);
    ac.getDeskTopPath()
  • 669362
    669362 Member Posts: 80
    Hi,

    are you sure that you are in a desktop and not in a streaming portal (.portal) ?

    Emmanuel
  • 668596
    668596 Member Posts: 48
    yes,I make a misstake,Appcontext can get a desktopPath, and PortalPath,thank you
This discussion has been closed.