Package org.apache.jetspeed.services.rundata

Examples of org.apache.jetspeed.services.rundata.JetspeedRunData


     * @param context
     */
    public void buildContext(RunData data, String name, String value, Map parms, Context context)
    {
        // Initialize options
        JetspeedRunData jdata = (JetspeedRunData)data;
        String mediaType = jdata.getProfile().getMediaType();
        String regName = (String)getParm(OPTION_REGISTRY, Registry.PORTLET);
        boolean sort = (new Boolean((String)getParm(OPTION_SORT, "true"))).booleanValue();
        boolean selectHidden = (new Boolean((String)getParm(OPTION_SELECT_HIDDEN, "false"))).booleanValue();
        String nullIfEmpty = (String)getParm(OPTION_NULL_IF_EMPTY, "true");
        boolean setLabel = (new Boolean((String)getParm(OPTION_SET_LABEL, "false"))).booleanValue();
View Full Code Here


                logger.error("Could not grant role: " + roles[ix] + " to user " + user.getUserName(), e);
            }
        }
        try
        {
            JetspeedRunData rundata = getRunData();
            if (rundata != null && Profiler.useRoleProfileMerging() == false)
            {
                Profile profile = Profiler.createProfile();
                profile.setUser(user);
                profile.setMediaType("html");
View Full Code Here

        return true;
    }

    protected JetspeedRunData getRunData()
     {
         JetspeedRunData rundata = null;
         if (this.runDataService != null)
         {
             rundata = this.runDataService.getCurrentRunData();
         }
         return rundata;
View Full Code Here

            if (entries == null)
            {           
                // Initialize the query locator
                QueryLocator ql = new QueryLocator(QueryLocator.QUERY_USER);

                JetspeedRunData jdata = (JetspeedRunData) rundata;
                ql.setUser(jdata.getJetspeedUser());
                //ql.setMediaType(jdata.getCapability().getPreferredMediaType());
                entries = new Hashtable();
                Iterator i = Profiler.query(ql);
                while (i.hasNext())
                {
                    Profile profile = (Profile) i.next();

                    String mediaType = profile.getMediaType();
                    if (mediaType != null && mediaType.equals(jdata.getCapability().getPreferredMediaType()))
                    {
                        if (PortletUtils.canAccessProfile(rundata, profile))
                        {
                            if (logger.isDebugEnabled())
                            {
View Full Code Here

                                       Context context,
                                       RunData rundata )
    {
        super.buildCustomizeContext(controller, context, rundata);

        JetspeedRunData jdata = (JetspeedRunData)rundata;
        PortletSet set = (PortletSet)jdata.getCustomized();

        Portlets portlets = jdata.getCustomizedProfile()
                                 .getDocument()
                                 .getPortletsById(set.getID());

        List plist = new ArrayList();
        List work = new ArrayList();
View Full Code Here

     * - paneid: the id a the pane to modify within the current profile
     * - position: the position of the component to delete
     */
    public void doDelete(RunData data, Context context) throws Exception
    {
      JetspeedRunData jdata = (JetspeedRunData)data;
      PortletSet customizedSet = (PortletSet)jdata.getCustomized();
      int position = data.getParameters().getInt("position",-1);
      Profile profile = jdata.getCustomizedProfile();

      // ADDED for WML
      //boolean isWML = (profile.getMediaType().equalsIgnoreCase("wml"));


View Full Code Here

     * - position: move the component which occupies this position
     * The moveUp boolean determines the direction of the move
     */
    public void doMove(RunData data, Context context, boolean moveUp) throws Exception
    {
        JetspeedRunData jdata = (JetspeedRunData)data;
        PortletSet customizedSet = (PortletSet)jdata.getCustomized();
        int position = data.getParameters().getInt("position",-1);
        Profile profile = jdata.getCustomizedProfile();

        // ADDED for WML
        //boolean isWML = (profile.getMediaType().equalsIgnoreCase("wml"));


View Full Code Here

         try {
             if (null != data)
             {
                 JetspeedRunData jdata = (JetspeedRunData)data;
                 Profile profile = jdata.getProfile();
                 if (null == profile)
                 {
                     logger.warn("JetspeedTool: profile is null");
                     profile = Profiler.getProfile(jdata);
                     jdata.setProfile(profile);
                 }
                 Portlet source = findPortlet(data);
                 if (source != null) {
                     jdata.setPortlet(source.getName());
                     info = PortletFactory.getPortlet(name, "PortletInfoPortlet");
                     info.getPortletConfig().setPortletSkin(source.getPortletConfig().getPortletSkin());
                     PortletControl control = PortalToolkit.getControl((String)null);
                     if (control != null)
                     {
View Full Code Here

      * @return portlet identified by js_peid
      */
     private static Portlet findPortlet(RunData rundata) {
         Portlet found = null;
         JetspeedRunData jdata = (JetspeedRunData)rundata;
         String peid = jdata.getJs_peid();
         if (peid != null)
         {
             Stack sets = new Stack();
             sets.push(jdata.getProfile().getRootSet());
             while ((found==null) && (sets.size() > 0))
             {
                 PortletSet set = (PortletSet)sets.pop();
View Full Code Here

                p = PortletFactory.getPortlet(portletName, "preview");
                PortletControl control = controlName == null ? PortalToolkit.getControl((String) null)
                                                             : PortalToolkit.getControl(controlName);
                if (control != null)
                {
                    JetspeedRunData jdata = (JetspeedRunData) rundata;
                    // Use the profile's skin
                    p.getPortletConfig().setPortletSkin(PortalToolkit.getSkin(jdata.getProfile().getDocument().getPortlets().getSkin()));
                    control.setPortlet(p);
                    control.init();
                    result = control.getContent(rundata);
                }
                else if (p != null)
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.services.rundata.JetspeedRunData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.