retrieving unique names programatically - Websphere

This is a discussion on retrieving unique names programatically - Websphere ; is there any way to retrieve the unique names of ALL the portlets deployed on a portal server ?...

+ Reply to Thread
Results 1 to 3 of 3

Thread: retrieving unique names programatically

  1. retrieving unique names programatically

    is there any way to retrieve the unique names of ALL the portlets deployed on a portal server ?

  2. Re: retrieving unique names programatically

    unique name of which?

    Portlet window,

    portlet app

    portlet



    you should be able to via the adminportletmodel in the portlet model 6.0.1



    Jim





    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  3. Re: retrieving unique names programatically

    javax.naming.Context ctx = new javax.naming.InitialContext();

    psh = (PortletServiceHome) ctx.lookup("portletservice/com.ibm.portal.portlet.service.model.PortletModelP rovider");

    serviceAvailable = true;

    PortletModelProvider portletProvider = (PortletModelProvider) psh
    .getPortletService(PortletModelProvider.class);

    AdminPortletModel portletmodel = portletProvider
    .getAdminPortletModel(request, response);


    PortletList list = portletmodel.getPortletList();

    for (Iterator iter = list.iterator(); iter.hasNext() {
    // System.out.println(iter.next().getClass());
    Portlet p = (Portlet) iter.next();


    System.out.println( p.getTitle(new java.util.Locale("zh"))+" "+p.getObjectID().getUniqueName()+" "+p.getDescription(new java.util.Locale("zh")));


    }

    but have a problem,if the portlet is copied from others,it can't list.Anybody has solution?

+ Reply to Thread