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.kernel.mobile.device;
016    
017    import java.util.Collections;
018    import java.util.Map;
019    
020    /**
021     * Class represents unknown device
022     *
023     * @author Milen Dyankov
024     */
025    public class UnknownDevice extends AbstractDevice {
026    
027            public static UnknownDevice getInstance() {
028                    return _instance;
029            }
030    
031            @Override
032            public String getBrand() {
033                    return VersionableName.UNKNOWN.getName();
034            }
035    
036            @Override
037            public String getBrowser() {
038                    return VersionableName.UNKNOWN.getName();
039            }
040    
041            @Override
042            public String getBrowserVersion() {
043                    return VersionableName.UNKNOWN.getName();
044            }
045    
046            @Override
047            public Map<String, Capability> getCapabilities() {
048                    return Collections.emptyMap();
049            }
050    
051            @Override
052            public String getCapability(String name) {
053                    return null;
054            }
055    
056            @Override
057            public String getModel() {
058                    return VersionableName.UNKNOWN.getName();
059            }
060    
061            @Override
062            public String getOS() {
063                    return VersionableName.UNKNOWN.getName();
064            }
065    
066            @Override
067            public String getOSVersion() {
068                    return VersionableName.UNKNOWN.getName();
069            }
070    
071            @Override
072            public String getPointingMethod() {
073                    return VersionableName.UNKNOWN.getName();
074            }
075    
076            @Override
077            public Dimensions getScreenSize() {
078                    return Dimensions.UNKNOWN;
079            }
080    
081            @Override
082            public boolean hasQwertyKeyboard() {
083                    return true;
084            }
085    
086            @Override
087            public boolean isTablet() {
088                    return false;
089            }
090    
091            private UnknownDevice() {
092            }
093    
094            private static UnknownDevice _instance = new UnknownDevice();
095    
096    }