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.layoutsadmin.lar;
016    
017    import com.liferay.portal.kernel.lar.StagedModelType;
018    import com.liferay.portal.kernel.util.StringPool;
019    import com.liferay.portal.model.Theme;
020    import com.liferay.portal.model.impl.ThemeImpl;
021    import com.liferay.portal.security.auth.CompanyThreadLocal;
022    import com.liferay.portlet.expando.model.ExpandoBridge;
023    
024    import java.io.Serializable;
025    
026    import java.util.Date;
027    
028    /**
029     * @author Mate Thurzo
030     */
031    public class StagedThemeImpl extends ThemeImpl implements StagedTheme {
032    
033            public StagedThemeImpl(Theme theme) {
034                    super(theme.getThemeId());
035            }
036    
037            @Override
038            public Object clone() {
039                    ThemeImpl themeImpl = new ThemeImpl(getThemeId());
040    
041                    return new StagedThemeImpl(themeImpl);
042            }
043    
044            @Override
045            public long getCompanyId() {
046                    return CompanyThreadLocal.getCompanyId();
047            }
048    
049            @Override
050            public Date getCreateDate() {
051                    return new Date();
052            }
053    
054            @Override
055            public ExpandoBridge getExpandoBridge() {
056                    return null;
057            }
058    
059            @Override
060            public Class<?> getModelClass() {
061                    return StagedTheme.class;
062            }
063    
064            @Override
065            public String getModelClassName() {
066                    return StagedTheme.class.getName();
067            }
068    
069            @Override
070            public Date getModifiedDate() {
071                    return new Date();
072            }
073    
074            @Override
075            public Serializable getPrimaryKeyObj() {
076                    return getThemeId();
077            }
078    
079            @Override
080            public StagedModelType getStagedModelType() {
081                    return new StagedModelType(StagedTheme.class);
082            }
083    
084            @Override
085            public String getUuid() {
086                    return StringPool.BLANK;
087            }
088    
089            @Override
090            public void setCompanyId(long companyId) {
091                    throw new UnsupportedOperationException();
092            }
093    
094            @Override
095            public void setCreateDate(Date date) {
096                    throw new UnsupportedOperationException();
097            }
098    
099            @Override
100            public void setModifiedDate(Date date) {
101                    throw new UnsupportedOperationException();
102            }
103    
104            @Override
105            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
106                    throw new UnsupportedOperationException();
107            }
108    
109            @Override
110            public void setUuid(String uuid) {
111                    throw new UnsupportedOperationException();
112            }
113    
114    }