001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.exportimport.lifecycle;
016    
017    import com.liferay.portal.kernel.util.ListUtil;
018    
019    import java.io.Serializable;
020    
021    import java.util.ArrayList;
022    import java.util.List;
023    
024    /**
025     * @author Daniel Kocsis
026     */
027    public class ExportImportLifecycleEventImpl
028            implements ExportImportLifecycleEvent {
029    
030            @Override
031            public List<Serializable> getAttributes() {
032                    return _attributes;
033            }
034    
035            @Override
036            public int getCode() {
037                    return _code;
038            }
039    
040            @Override
041            public int getProcessFlag() {
042                    return _processFlag;
043            }
044    
045            @Override
046            public void setAttributes(Serializable... attributes) {
047                    _attributes.addAll(ListUtil.fromArray(attributes));
048            }
049    
050            @Override
051            public void setCode(int code) {
052                    _code = code;
053            }
054    
055            @Override
056            public void setProcessFlag(int processFlag) {
057                    _processFlag = processFlag;
058            }
059    
060            private final List<Serializable> _attributes = new ArrayList<>();
061            private int _code;
062            private int _processFlag;
063    
064    }