Package org.apache.jetspeed.rewriter.rules

Examples of org.apache.jetspeed.rewriter.rules.Tag


              
        tagMap.clear();       
        it = tags.iterator();
        while (it.hasNext())                   
        {
            Tag tag = (Tag)it.next();
            tagMap.put(tag.getId(), tag);
            Iterator attributes = tag.getAttributes().iterator();
            while (attributes.hasNext())
            {               
                Attribute attribute = (Attribute)attributes.next();               
                if (attribute instanceof AttributeImpl)
                {
View Full Code Here


        if (null == ruleset)
        {
            return false;
        }
       
        Tag tag = ruleset.getTag(tagid.toUpperCase());
        if (null == tag)
        {
            return false;
        }
        return tag.getStrip();       
    }
View Full Code Here

        if (null == ruleset)
        {
            return false;
        }
       
        Tag tag = ruleset.getTag(tagid.toUpperCase());
        if (null == tag)
        {
            return false;
        }
        return tag.getRemove();
    }
View Full Code Here

        if (null == ruleset)
        {
            return;
        }
       
        Tag tag = ruleset.getTag(tagid.toUpperCase());
        if (null == tag)
        {
            return;
        }

        Iterator attribRules = tag.getAttributes().iterator();
        while (attribRules.hasNext())
        {
            Attribute attribute = (Attribute)attribRules.next();
            String name = attribute.getId();
            String value = (String)attributes.getValue(name);
            //String id = (String)attributes.getValue("name");
            //System.out.println("id = " + id);
            //System.out.println("value = " + value);
            //System.out.println("name = " + name);
               
            if (value != null) // && name.equalsIgnoreCase(attribute.getId()))
            {
                Rule rule = attribute.getRule();
                if (null == rule)
                {
                    continue;
                }
               
                if (!rule.shouldRewrite(value))
                {
                    continue;
                }                                       
               
                String rewritten = rewriteUrl(value, tag.getId(), name);
                if (null != rewritten) // return null indicates "don't rewrite"
                {
                    if (rule.getSuffix() != null)
                    {
                        rewritten = rewritten.concat(rule.getSuffix());
View Full Code Here

        if (null == ruleset)
        {
            return false;
        }
       
        Tag tag = ruleset.getTag(tagid.toUpperCase());
        if (null == tag)
        {
            return false;
        }
        return tag.getStrip();       
    }
View Full Code Here

        if (null == ruleset)
        {
            return false;
        }
       
        Tag tag = ruleset.getTag(tagid.toUpperCase());
        if (null == tag)
        {
            return false;
        }
        return tag.getRemove();
    }
View Full Code Here

        if (null == ruleset)
        {
            return;
        }
       
        Tag tag = ruleset.getTag(tagid.toUpperCase());
        if (null == tag)
        {
            return;
        }

        Iterator attribRules = tag.getAttributes().iterator();
        while (attribRules.hasNext())
        {
            Attribute attribute = (Attribute)attribRules.next();
            String name = attribute.getId();
            String value = (String)attributes.getValue(name);
            //String id = (String)attributes.getValue("name");
            //System.out.println("id = " + id);
            //System.out.println("value = " + value);
            //System.out.println("name = " + name);
               
            if (value != null) // && name.equalsIgnoreCase(attribute.getId()))
            {
                Rule rule = attribute.getRule();
                if (null == rule)
                {
                    continue;
                }
               
                if (!rule.shouldRewrite(value))
                {
                    continue;
                }                                       
               
                String rewritten = rewriteUrl(value, tag.getId(), name);
                if (null != rewritten) // return null indicates "don't rewrite"
                {
                    if (rule.getSuffix() != null)
                    {
                        rewritten = rewritten.concat(rule.getSuffix());
View Full Code Here

        if (null == ruleset)
        {
            return false;
        }
       
        Tag tag = ruleset.getTag(tagid.toUpperCase());
        if (null == tag)
        {
            return false;
        }
        return tag.getStrip();       
    }
View Full Code Here

        if (null == ruleset)
        {
            return false;
        }
       
        Tag tag = ruleset.getTag(tagid.toUpperCase());
        if (null == tag)
        {
            return false;
        }
        return tag.getRemove();
    }
View Full Code Here

        if (null == ruleset)
        {
            return;
        }
       
        Tag tag = ruleset.getTag(tagid.toUpperCase());
        if (null == tag)
        {
            return;
        }

        Iterator attribRules = tag.getAttributes().iterator();
        while (attribRules.hasNext())
        {
            Attribute attribute = (Attribute)attribRules.next();
            String name = attribute.getId();
            String value = (String)attributes.getValue(name);
            //String id = (String)attributes.getValue("name");
            //System.out.println("id = " + id);
            //System.out.println("value = " + value);
            //System.out.println("name = " + name);
               
            if (value != null) // && name.equalsIgnoreCase(attribute.getId()))
            {
                Rule rule = attribute.getRule();
                if (null == rule)
                {
                    continue;
                }
               
                if (!rule.shouldRewrite(value))
                {
                    continue;
                }                                       
               
                String rewritten = rewriteUrl(value, tag.getId(), name);
                if (null != rewritten) // return null indicates "don't rewrite"
                {
                    if (rule.getSuffix() != null)
                    {
                        rewritten = rewritten.concat(rule.getSuffix());
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.rewriter.rules.Tag

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.