1 package org.apache.jetspeed.util; 2 3 import org.apache.jetspeed.om.profile.Portlets; 4 import org.apache.jetspeed.om.profile.Entry; 5 import org.apache.jetspeed.om.profile.Profile; 6 import org.apache.jetspeed.services.rundata.JetspeedRunData; 7 import org.apache.jetspeed.portal.PortletSet; 8 9 import org.apache.turbine.util.RunData; 10 11 import java.util.*; 12 13 19 public class AutoProfile 20 { 21 27 73 74 82 138 139 public static List getPortletList (RunData rundata) 144 { 145 Profile profile = ((JetspeedRunData)rundata).getCustomizedProfile(); 146 Portlets allPortlets = profile.getDocument().getPortletsById(((PortletSet)((JetspeedRunData)rundata).getCustomized()).getID()); 147 148 149 List installed = new ArrayList (); 150 Entry iPortlet; 151 152 153 if (allPortlets != null) 154 { 155 for (int ii = 0; ii < allPortlets.getEntryCount(); ii++) 156 { 157 iPortlet = (Entry) allPortlets.getEntry (ii); 158 installed.add (iPortlet); 159 } 160 } 161 162 return installed; 163 } 164 165 } 166 | Popular Tags |