All Downloads are FREE. Search and download functionalities are using the official Maven repository.

atom.view.AbstractView Maven / Gradle / Ivy

/*
 * Copyright © 2015 Geeoz, and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * The Research Projects is dual-licensed under the GNU General Public
 * License, version 2.0 (GPLv2) and the Geeoz Commercial License.
 *
 * Solely for non-commercial purposes. A purpose is non-commercial only if
 * it is in no manner primarily intended for or directed toward commercial
 * advantage or private monetary compensation.
 *
 * This Geeoz Software is supplied to you by Geeoz in consideration of your
 * agreement to the following terms, and your use, installation, modification
 * or redistribution of this Geeoz Software constitutes acceptance of these
 * terms. If you do not agree with these terms, please do not use, install,
 * modify or redistribute this Geeoz Software.
 *
 * Neither the name, trademarks, service marks or logos of Geeoz may be used
 * to endorse or promote products derived from the Geeoz Software without
 * specific prior written permission from Geeoz.
 *
 * The Geeoz Software is provided by Geeoz on an "AS IS" basis. GEEOZ MAKES NO
 * WARRANTIES, EXPRESS  OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
 * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE, REGARDING THE GEEOZ SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
 * COMBINATION WITH YOUR PRODUCTS.
 *
 * IN NO EVENT SHALL GEEOZ BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION
 * AND/OR DISTRIBUTION OF THE GEEOZ SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER
 * THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR
 * OTHERWISE, EVEN IF GEEOZ HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * A copy of the GNU General Public License is included in the distribution in
 * the file LICENSE and at
 *
 *     http://www.gnu.org/licenses/gpl-2.0.html
 *
 * If you are using the Research Projects for commercial purposes, we
 * encourage you to visit
 *
 *     http://products.geeoz.com/license
 *
 * for more details.
 *
 * This software or hardware and documentation may provide access to
 * or information on content, products, and services from third parties.
 * Geeoz and its affiliates are not responsible for and expressly disclaim
 * all warranties of any kind with respect to third-party content, products,
 * and services. Geeoz and its affiliates will not be responsible for any loss,
 * costs, or damages incurred due to your access to or use of third-party
 * content, products, or services. If a third-party content exists, the
 * additional copyright notices and license terms applicable to portions of the
 * software are set forth in the THIRD_PARTY_LICENSE_README file.
 *
 * Please contact Geeoz or visit www.geeoz.com if you need additional
 * information or have any questions.
 */

package atom.view;

import atom.beans.event.AbstractInsertChildPropertyChangeEvent;
import atom.beans.event.AbstractPropertyChangeEvent;
import atom.beans.event.InsertChildPropertyChangeEvent;
import atom.beans.event.InsertFirstChildPropertyChangeEvent;
import atom.beans.event.MultiplePropertyChangeEvent;
import atom.beans.event.RemoveChildPropertyChangeEvent;
import atom.beans.event.SimplePropertyChangeEvent;
import atom.view.constants.ViewConstants;
import atom.widget.AnchorView;
import atom.widget.Button;
import atom.widget.CheckBox;
import atom.widget.DateView;
import atom.widget.EditText;
import atom.widget.GalleryView;
import atom.widget.GoogleAutocompleteView;
import atom.widget.ImageView;
import atom.widget.LabelView;
import atom.widget.LinearLayout;
import atom.widget.ListView;
import atom.widget.LoadingView;
import atom.widget.MapPointView;
import atom.widget.MapView;
import atom.widget.RadioButton;
import atom.widget.RadioGroup;
import atom.widget.Slider;
import atom.widget.Spinner;
import atom.widget.TextView;
import atom.widget.UploadView;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import scala.Some;

import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/**
 * This abstract class represents the basic change tracking support.
 *
 * @author Alex Voloshyn
 * @author Serge Voloshyn
 * @author Vladimir Ovcharov
 * @version 1.21 4/18/15
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME,
        include = JsonTypeInfo.As.PROPERTY, property = "jso")
@JsonSubTypes({
        @JsonSubTypes.Type(value = View.class, name = "View"),
        @JsonSubTypes.Type(value = Window.class, name = "Window"),
        @JsonSubTypes.Type(value = MapPointView.class, name = "MapPointView"),
        @JsonSubTypes.Type(value = LoadingView.class, name = "LoadingView"),
        @JsonSubTypes.Type(value = Slider.class, name = "Slider"),
        @JsonSubTypes.Type(value = DateView.class, name = "DateView"),
        @JsonSubTypes.Type(value = GoogleAutocompleteView.class,
                name = "GoogleAutocompleteView"),
        @JsonSubTypes.Type(value = AnchorView.class, name = "AnchorView"),
        @JsonSubTypes.Type(value = UploadView.class, name = "UploadView"),
        @JsonSubTypes.Type(value = ImageView.class, name = "ImageView"),
        @JsonSubTypes.Type(value = LabelView.class, name = "LabelView"),
        @JsonSubTypes.Type(value = RadioButton.class, name = "RadioButton"),
        @JsonSubTypes.Type(value = CheckBox.class, name = "CheckBox"),
        @JsonSubTypes.Type(value = Button.class, name = "Button"),
        @JsonSubTypes.Type(value = EditText.class, name = "EditText"),
        @JsonSubTypes.Type(value = TextView.class, name = "TextView"),
        @JsonSubTypes.Type(value = RadioGroup.class, name = "RadioGroup"),
        @JsonSubTypes.Type(value = LinearLayout.class, name = "LinearLayout"),
        @JsonSubTypes.Type(value = GalleryView.class, name = "GalleryView"),
        @JsonSubTypes.Type(value = ListView.class, name = "ListView"),
        @JsonSubTypes.Type(value = MapView.class, name = "MapView"),
        @JsonSubTypes.Type(value = Spinner.class, name = "Spinner"),
        @JsonSubTypes.Type(value = ViewGroup.class, name = "ViewGroup")
})
public abstract class AbstractView implements Serializable, ViewSearch {
    /**
     * Use serialVersionUID from JDK 1.0.2 for interoperability.
     */
    private static final long serialVersionUID = -150771344243581601L;
    /**
     * JAXB manifest namespace.
     */
    public static final String LAYOUT_NAMESPACE =
            "http://atom.geeoz.com/layout/1.0";
    /**
     * The view's identifier.
     */
    private String viewId;
    /**
     * Binary service's path responsible to file uploading.
     */
    private String binaryPath;
    /**
     * Binary service's attributes.
     */
    private List




© 2015 - 2025 Weber Informatics LLC | Privacy Policy