001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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    }