Examples of StringElement


Examples of org.apache.ecs.StringElement

        }

        if (result == null)
        {
            result = new StringElement("Error retrieving Portal Page: " + msg);
        }

        return result;
    }
View Full Code Here

Examples of org.apache.ecs.StringElement

                    if (null == entry)
                    {
                        // FIXME: need to write this function
                        // Portlets ps = doc.getPortletsById(id);
                        result =
                            new StringElement("not implemented - PortletElement");
                    }
                    else
                    {
                        Portlet p = PortletFactory.getPortlet(entry);
                        if (p != null)
                        {
                            result = p.getContent(rundata);
                        }
                        else
                            result =
                                new StringElement("Error retrieving PortletElement");

                    }
                }
            }
            catch (Exception e)
            {
                logger.error("Exception", e);
            }
        }

        if (result == null)
        {
            result = new StringElement("Error fetching pane");
        }

        return result;

    }
View Full Code Here

Examples of org.apache.ecs.StringElement

            String message = "JSPViewProcessor: Could not include the following JSP Page:  [" + template + "] :\n\t"
                             + e.getMessage();
            logger.error(message, e);

            return new StringElement(message);
        }

        return new JetspeedClearElement(result);
    }
View Full Code Here

Examples of org.apache.ecs.StringElement

    public ConcreteElement getContent(RunData rundata)
    {
        String servletURL = processURL(rundata);
    if(servletURL == null)
    {
      return new StringElement("ServletInvokerPortlet:  Must specify a URL using the URL parameter");
    }
        String content;

        //  This is probably not robust for large content returns, but should work okay within an application context with small amounts of content.
        try
        {

            URL url = new URL(servletURL);
            URLConnection connection = url.openConnection();
            InputStream stream = connection.getInputStream();
            BufferedInputStream in = new BufferedInputStream(stream);
            int length = 0;
            byte[] buf = new byte[BUFFER_SIZE];
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            while ((in != null) && ((length = in.read(buf)) != -1))
            {
                // the data has already been read into buf
                out.write(buf, 0, length);
            }
            content = out.toString();
            return new StringElement(content);
        }
        catch (Exception e)
        {
            String message = "ServletInvokerPortlet: Error invoking " + servletURL + ": " + e.getMessage();
            return new StringElement(message);
        }

    }
View Full Code Here

Examples of org.apache.ecs.StringElement

            //save the portlet markup after you have made the changes.
            this.getContentMarkup( this.getURL( provider ) ).save();

        } catch ( Throwable t ) {
            logger.error("Throwable", t);
            return new StringElement( "Can't use this provider: " + t.getMessage() );
        }
       
        ec.addElement( "Your article '" + title + "' has been posted within '" + topic + "'" );
       
        return ec;
View Full Code Here

Examples of org.apache.ecs.StringElement

        Content content = null;
        try {
            content = this.getContentMarkup( this.getURL( provider ) ).getContent();
        } catch ( Exception e ) {
            logger.error("Exception",  e);
            return new StringElement( "Can't use this provider: " + e.getMessage() );
        }
       
        Select select = new Select();
        select.setName( "topic" );
View Full Code Here

Examples of org.apache.ecs.StringElement

            PortletWrapper wrapper = (PortletWrapper)portlet;
            if (!wrapper.getAllowView(rundata))
            {
                if (JetspeedResources.getBoolean("defaultportletcontrol.hide.decorator", true))
                {
                    return new StringElement("");
                }
            }
        }
       
        return portlet.getContent( rundata );
View Full Code Here

Examples of org.apache.ecs.StringElement

            s= e.toString();
        }
       
        TurbineVelocity.requestFinished(context);

        return new StringElement( s );
    }
View Full Code Here

Examples of org.apache.ecs.StringElement

            String message = "JSPViewProcessor: Could not include the following JSP Page:  [" + template + "] :\n\t"
                             + e.getMessage();
            logger.error(message, e);

            return new StringElement(message);
        }

        return new ElementContainer();
    }
View Full Code Here

Examples of org.apache.ecs.StringElement

            // Clear any portlets that exist in this set
            if (this.portlets != null)
            {
                this.portlets.clear();
            }
            return new StringElement(CustomLocalization.getString("SECURITY_NO_ACCESS", rundata));
        }
        else
        {
            if ( logger.isDebugEnabled() )
            {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.