001    /**
002     * Copyright (c) 2000-2011 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            public String getBrand() {
032                    return VersionableName.UNKNOWN.getName();
033            }
034    
035            public String getBrowser() {
036                    return VersionableName.UNKNOWN.getName();
037            }
038    
039            public String getBrowserVersion() {
040                    return VersionableName.UNKNOWN.getName();
041            }
042    
043            public Map<String, Capability> getCapabilities() {
044                    return Collections.emptyMap();
045            }
046    
047            public String getCapability(String name) {
048                    return null;
049            }
050    
051            public String getModel() {
052                    return VersionableName.UNKNOWN.getName();
053            }
054    
055            public String getOS() {
056                    return VersionableName.UNKNOWN.getName();
057            }
058    
059            public String getOSVersion() {
060                    return VersionableName.UNKNOWN.getName();
061            }
062    
063            public String getPointingMethod() {
064                    return VersionableName.UNKNOWN.getName();
065            }
066    
067            public Dimensions getScreenSize() {
068                    return Dimensions.UNKNOWN;
069            }
070    
071            public boolean hasQwertyKeyboard() {
072                    return true;
073            }
074    
075            public boolean isTablet() {
076                    return false;
077            }
078    
079            private UnknownDevice() {
080            }
081    
082            private static UnknownDevice _instance = new UnknownDevice();
083    
084    }