001    /**
002     * Copyright (c) 2000-2012 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.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    }