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            @Override
042            public void addAliasQName(QName aliasQName) {
043                    _qNames.add(aliasQName);
044            }
045    
046            @Override
047            public PortletApp getPortletApp() {
048                    return _portletApp;
049            }
050    
051            @Override
052            public QName getQName() {
053                    return _qName;
054            }
055    
056            @Override
057            public Set<QName> getQNames() {
058                    return _qNames;
059            }
060    
061            @Override
062            public String getValueType() {
063                    return _valueType;
064            }
065    
066            @Override
067            public void setPortletApp(PortletApp portletApp) {
068                    _portletApp = portletApp;
069            }
070    
071            @Override
072            public void setQName(QName qName) {
073                    _qName = qName;
074            }
075    
076            @Override
077            public void setValueType(String valueType) {
078                    _valueType = valueType;
079            }
080    
081            private PortletApp _portletApp;
082            private QName _qName;
083            private Set<QName> _qNames;
084            private String _valueType;
085    
086    }