001    /**
002     * Copyright (c) 2000-2013 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.portal.model.impl;
016    
017    import com.liferay.portal.kernel.xml.QName;
018    import com.liferay.portal.model.EventDefinition;
019    import com.liferay.portal.model.PortletApp;
020    
021    import java.util.HashSet;
022    import java.util.Set;
023    
024    /**
025     * @author Brian Wing Shun Chan
026     */
027    public class EventDefinitionImpl implements EventDefinition {
028    
029            public EventDefinitionImpl(
030                    QName qName, String valueType, PortletApp portletApp) {
031    
032                    _qName = qName;
033                    _valueType = valueType;
034                    _portletApp = portletApp;
035    
036                    _qNames = new HashSet<QName>();
037    
038                    _qNames.add(_qName);
039            }
040    
041            public void addAliasQName(QName aliasQName) {
042                    _qNames.add(aliasQName);
043            }
044    
045            public PortletApp getPortletApp() {
046                    return _portletApp;
047            }
048    
049            public QName getQName() {
050                    return _qName;
051            }
052    
053            public Set<QName> getQNames() {
054                    return _qNames;
055            }
056    
057            public String getValueType() {
058                    return _valueType;
059            }
060    
061            public void setPortletApp(PortletApp portletApp) {
062                    _portletApp = portletApp;
063            }
064    
065            public void setQName(QName qName) {
066                    _qName = qName;
067            }
068    
069            public void setValueType(String valueType) {
070                    _valueType = valueType;
071            }
072    
073            private PortletApp _portletApp;
074            private QName _qName;
075            private Set<QName> _qNames;
076            private String _valueType;
077    
078    }