Package com.psddev.cms.db

Source Code of com.psddev.cms.db.EmbeddedDataOperation

package com.psddev.cms.db;

import com.psddev.dari.db.State;

import java.util.Map;

/**
* @deprecated No replacement.
*/
@Deprecated
@Operation.DisplayName("Use Embedded Variation Data")
public class EmbeddedDataOperation extends Operation {

    @Override
    public void evaluate(
            Variation variation, Profile profile, Object object) {
        State state = State.getInstance(object);
        Map<String, Object> variationData = (Map<String, Object>)
                state.getValue("variations/" + variation.getId());
        if (variationData != null) {
            state.getValues().putAll(variationData);
        }
    }
}
TOP

Related Classes of com.psddev.cms.db.EmbeddedDataOperation

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.