Package org.apache.jetspeed.util

Examples of org.apache.jetspeed.util.DefaultKeyValue


        if (element == null)
        {
            if (keyHint != null)
            {
                KeyValue<String, Element> kvPair = new DefaultKeyValue(keyHint, null, true);
                this.headElements.remove(kvPair);
            }
            else
            {
                // If element is null and keyHint is null, remove all head elements.
                // This is complying with the portlet spec.
                this.headElements.clear();
            }
           
            return;
        }
       
        if (!(element instanceof Serializable))
        {
            throw new NotSerializableException("The element is not serializable.");
        }
       
        if (keyHint == null)
        {
            // If element is dom4j's element, then we can use dom4j's serializer.
            // Meanwhile, the element can be a serializable one which is not from dom4j.
            // In the case, serialize the element to a string as a keyHint.
           
            if (element instanceof org.dom4j.Element)
            {
                keyHint = DOMUtils.stringifyElement((org.dom4j.Element) element);
            }
            else
            {
                keyHint = DOMUtils.stringifyElement(element);
            }
        }

        KeyValue<String, Element> kvPair = new DefaultKeyValue(keyHint, element, true);
       
        if (!this.headElements.contains(kvPair))
        {
            this.headElements.add(kvPair);
        }
View Full Code Here


        if (headElement == null)
        {
            if (keyHint != null)
            {
                KeyValue<String, HeadElement> kvPair = new DefaultKeyValue(keyHint, null, true);
                this.headElements.remove(kvPair);
            }
            else
            {
                // If element is null and keyHint is null, remove all head elements.
                // This is complying with the portlet spec.
                this.headElements.clear();
            }
           
            return;
        }
       
        if (keyHint == null)
        {
            keyHint = HeadElementUtils.toHtmlString(headElement);
        }

        KeyValue<String, HeadElement> kvPair = new DefaultKeyValue(keyHint, headElement, true);
       
        if (!this.headElements.contains(kvPair))
        {
            this.headElements.add(kvPair);
        }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.util.DefaultKeyValue

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.