Package org.apache.turbine.util.uri

Examples of org.apache.turbine.util.uri.DataURI


     * method would probably be enough, but I'm not
     * absolutely positive.
     */
    public String image(String imageId, RunData data)
    {
        DataURI du = new DataURI(data);

        StringBuffer sb = new StringBuffer();

        sb.append(resourcesDirectory).
                append('/').
                append(skinsDirectory).
                append('/').
                append(getSkin()).
                append('/').
                append(imagesDirectory).
                append('/').
                append(stripSlashes(imageId));

        du.setScriptName(sb.toString());

        return wantRelative ? du.getRelativeLink() : du.getAbsoluteLink();
    }
View Full Code Here


     * directory.
     */
    public String image(String imageId)
    {
        ServerData sd = Turbine.getDefaultServerData();
        DataURI du = new DataURI(sd);

        StringBuffer sb = new StringBuffer();

        sb.append(resourcesDirectory).
                append('/').
                append(skinsDirectory).
                append('/').
                append(getSkin()).
                append('/').
                append(imagesDirectory).
                append('/').
                append(stripSlashes(imageId));

        du.setScriptName(sb.toString());
        return wantRelative ? du.getRelativeLink() : du.getAbsoluteLink();
    }
View Full Code Here

     * of a skin. The script is stored in the
     * WEBAPP/resources/ui/skins/<SKIN> directory
     */
    public String getScript(String filename, RunData data)
    {
        DataURI du = new DataURI(data);

        StringBuffer sb = new StringBuffer();

        sb.append(resourcesDirectory).
                append('/').
                append(skinsDirectory).
                append('/').
                append(getSkin()).
                append('/').
                append(stripSlashes(filename));

        du.setScriptName(sb.toString());
        return wantRelative ? du.getRelativeLink() : du.getAbsoluteLink();
    }
View Full Code Here

     * WEBAPP/resources/ui/skins/<SKIN> directory
     */
    public String getScript(String filename)
    {
        ServerData sd = Turbine.getDefaultServerData();
        DataURI du = new DataURI(sd);

        StringBuffer sb = new StringBuffer();

        sb.append(resourcesDirectory).
                append('/').
                append(skinsDirectory).
                append('/').
                append(getSkin()).
                append('/').
                append(stripSlashes(filename));

        du.setScriptName(sb.toString());
        return wantRelative ? du.getRelativeLink() : du.getAbsoluteLink();
    }
View Full Code Here

    public void init(Object data)
    {
        // we just blithely cast to RunData as if another object
        // or null is passed in we'll throw an appropriate runtime
        // exception.
        dataURI = new DataURI((RunData) data);

        Configuration conf =
                Turbine.getConfiguration().subset(CONTENT_TOOL_PREFIX);

        if (conf != null)
View Full Code Here

        clear();

        String enc = request.getCharacterEncoding();
        setCharacterEncoding(enc != null ? enc : "US-ASCII");

        cookiePath = new DataURI(data);

        Cookie[] cookies = request.getCookies();

        int cookiesCount = (cookies != null) ? cookies.length : 0;
View Full Code Here

     * method would probably be enough, but I'm not
     * absolutely positive.
     */
    public String image(String imageId, RunData data)
    {
        DataURI du = new DataURI(data);

        StringBuffer sb = new StringBuffer();

        sb.append(resourcesDirectory).
                append(SKINS_DIRECTORY).
                append("/").
                append(getSkin()).
                append(IMAGES_DIRECTORY).
                append("/").
                append(imageId);

        du.setScriptName(sb.toString());
        return du.getAbsoluteLink();
    }
View Full Code Here

     * directory.
     */
    public String image(String imageId)
    {
        ServerData sd = Turbine.getDefaultServerData();
        DataURI du = new DataURI(sd);

        StringBuffer sb = new StringBuffer();

        sb.append(resourcesDirectory).
           append(SKINS_DIRECTORY).
           append("/").
           append(getSkin()).
           append(IMAGES_DIRECTORY).
           append("/").
           append(imageId);

        du.setScriptName(sb.toString());
        return du.getAbsoluteLink();
    }
View Full Code Here

     * method would probably be enough, but I'm not
     * absolutely positive.
     */
    public String getStylecss(RunData data)
    {
        DataURI du = new DataURI(data);
        StringBuffer sb = new StringBuffer();

        sb.append(resourcesDirectory).
                append(SKINS_DIRECTORY).
                append("/").
                append(getSkin()).
                append("/").
                append(SKIN_CSS_FILE);

        du.setScriptName(sb.toString());
        return du.getAbsoluteLink();
    }
View Full Code Here

     * filename skin.css
     */
    public String getStylecss()
    {
        ServerData sd = Turbine.getDefaultServerData();
        DataURI du = new DataURI(sd);

        StringBuffer sb = new StringBuffer();

        sb.append(resourcesDirectory).
           append(SKINS_DIRECTORY).
           append("/").
           append(getSkin()).
           append("/").
           append(SKIN_CSS_FILE);

        du.setScriptName(sb.toString());
        return du.getAbsoluteLink();
    }
View Full Code Here

TOP

Related Classes of org.apache.turbine.util.uri.DataURI

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.