Package org.exoplatform.portal.mop.navigation

Examples of org.exoplatform.portal.mop.navigation.AttributesState$Builder


        }

        T oldValue = get(key);

        NodeState oldState = context.getState();
        AttributesState oldAttributes = oldState.getAttributesState();
        String stringValue = value != null ? toString(key.getType(), value) : null;
        AttributesState newAttributes = new AttributesState.Builder(oldAttributes).attribute(key.getName(), stringValue).build();
        NodeState newState = new NodeState.Builder(oldState).attributes(newAttributes).build();
        context.setState(newState);

        return oldValue;
    }
View Full Code Here


     * @see java.util.Map#put(java.lang.Object, java.lang.Object)
     */
    @Override
    public String put(String key, String value) {
        NodeState oldState = context.getState();
        AttributesState oldAttributes = oldState.getAttributesState();
        AttributesState newAttributes = new AttributesState.Builder(oldAttributes).attribute(key, value).build();
        NodeState newState = new NodeState.Builder(oldState).attributes(newAttributes).build();
        context.setState(newState);
        return oldAttributes != null ? oldAttributes.get(key) : null;
    }
View Full Code Here

     * @see java.util.Map#putAll(java.util.Map)
     */
    @Override
    public void putAll(Map<? extends String, ? extends String> m) {
        NodeState oldState = context.getState();
        AttributesState oldAttributes = oldState.getAttributesState();
        AttributesState newAttributes = new AttributesState.Builder(oldAttributes).attributes(m).build();
        NodeState newState = new NodeState.Builder(oldState).attributes(newAttributes).build();
        context.setState(newState);
    }
View Full Code Here

            return true;
        } else if (o == null) {
            return false;
        } else if (o.getClass() == this.getClass()) {
            ApiNodeAttributes other = (ApiNodeAttributes) o;
            AttributesState otherState = other.context.getState().getAttributesState();
            AttributesState thisState = this.context.getState().getAttributesState();
            return otherState == thisState || (otherState != null && otherState.equals(thisState));
        }
        return false;
    }
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.mop.navigation.AttributesState$Builder

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.