001/*
002 *  Copyright 2018 Anyware Services
003 *
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package org.ametys.cms.content;
017
018import java.util.List;
019
020import org.ametys.cms.content.compare.ContentComparatorChange;
021import org.ametys.cms.repository.Content;
022import org.ametys.runtime.model.DefinitionAndValue;
023import org.ametys.runtime.model.ModelItem;
024
025/**
026 * Pair of a value and its definition for a content attribute
027 */
028public class ContentAttributeDefinitionAndValue extends DefinitionAndValue<Content>
029{
030    /**
031     * Creates a definition and value pair
032     * @param root the root object of this definition and value pair
033     * @param definition the definition
034     * @param value the value
035     */
036    public ContentAttributeDefinitionAndValue(Content root, ModelItem definition, Object value)
037    {
038        this(root, definition, value, null);
039    }
040    
041    /**
042     * Creates a definition and value pair
043     * @param root the root object of this definition and value pair
044     * @param definition the definition
045     * @param value the value
046     * @param parent the parent of the definition and value pair
047     */
048    public ContentAttributeDefinitionAndValue(Content root, ModelItem definition, Object value, DefinitionAndValue<Content> parent)
049    {
050        super(root, definition, value, parent);
051    }
052    
053    List<ContentComparatorChange> compare(ContentAttributeDefinitionAndValue definitionAndValue)
054    {
055        return null;
056    }
057}