public abstract class ERXBrowser extends Object implements NSKeyValueCoding
isIE
,
isOmniWeb
, isVersion5
and
isMozilla40Compatible
.
ERXBrowser is immutable and shared by different sessions and direct actions. The shared instances are managed by ERXBrowserFactory which is also responsible to parse "user-agent" header in a WORequest object and to get an appropriate browser object.
One concrete browser, ERXBasicBrowser, is defined in the
ERExtensions framework. It not only implements the basic
questions defined by ERXBrowser, but also more specific
questions like isIFrameSupported
and
willRenderNestedTablesFast
.
You can extend ERXBrowser or its concrete subclass
ERXBasicBrowser to implement more specific questions for
your application. One good example will be to have a question
isSupportedBrowser
that checks if the client
is using one of the supported browsers for your application.
ERXSession holds a browser object that represent the web
browser for that session and browser
method
returns the object.
To access ERXBrowser's boolean questions from WOConditionals
on a web component, set the key path like "session.brower.isIFrameSupported"
to their condition bindings.
ERXDirectAction also holds a browser object for the current request.
Use its browser
method to access the object from a
session-less direct action.
isIE
,
isOmniWeb
, isVersion5
と
isMozilla40Compatible
の情報を簡単にアクセスできます。
ERXBrowser は不変で、他のセッションとダイレクト・アクションで共有されています。 共有インスタンスは ERXBrowserFactory で管理されています。他には ERXBrowserFactory が WORequest の "user-agent" パースとブラウザ・オブジェクトの作成を担当しています。
ERExtensions フレームワークには ERXBasicBrowser ブラウザ・オブジェクトが明確にされている。
ERXBrowser の基本な調査メソッドのみではなく、もっと確実な isIFrameSupported
と willRenderNestedTablesFast
を回答します。
自分のアプリケーションの為に ERXBrowser や ERXBasicBrowser のサブクラスをつくることができます。
例:アプリケーションでサポートされているブラウザかどうかの isSupportedBrowser
を追加できます。
ERXSession はブラウザ・オブジェクトを保持し、セッションにアクセスしている Web Browser の情報を持っている。
browser
メソッドでオブジェクトを取得できます。
コンポーネント内の WOConditionals より ERXBrowser の boolean を問い合わせにアクセスする時、
次のようなキーパス "session.brower.isIFrameSupported" をバインディングします。
ERXDirectAction もカレント・リクエストのブラウザ・オブジェクトを保持します。
オブジェクトをアクセスするには browser
メソッドを使用します。
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor
Modifier and Type | Field and Description |
---|---|
static String |
ANDROID |
static String |
CHROME |
static String |
EDGE |
static String |
FIREFOX |
static String |
ICAB |
static String |
IE |
static String |
IPAD |
static String |
IPHONE |
static String |
LINUX |
static String |
MACOS |
static String |
MOZILLA |
static String |
NETSCAPE |
static String |
NO_GECKO |
static String |
OMNIWEB |
static String |
OPERA |
static String |
POWER_PC |
static String |
ROBOT |
static String |
SAFARI |
static String |
UNKNOWN_BROWSER |
static String |
UNKNOWN_CPU |
static String |
UNKNOWN_PLATFORM |
static String |
UNKNOWN_VERSION |
static String |
WINDOWS |
_CLASS, NullValue
Constructor and Description |
---|
ERXBrowser() |
Modifier and Type | Method and Description |
---|---|
abstract String |
browserName()
Browser name string
ブラウザ名を戻します
|
String |
formValueEncoding()
If using ERXRequest objects allows one to override on a per browser basis
what form value encoding to use.
|
abstract String |
geckoRevision()
The revision of the gecko rendering engine.
|
abstract boolean |
isAndroid() |
abstract boolean |
isChrome()
Browser is Chrome?
ブラウザは Chrome ですか?
|
abstract boolean |
isEdge()
Browser is Microsoft Edge?
ブラウザは Microsoft Edge ですか?
|
abstract boolean |
isFirefox()
Browser is Firefox?
ブラウザは Firefox ですか?
|
abstract boolean |
isICab()
Browser is iCab?
ブラウザは iCab ですか?
|
abstract boolean |
isIE()
Browser is Internet Explorer?
ブラウザは Internet Explorer ですか?
|
abstract boolean |
isIPad() |
abstract boolean |
isIPhone() |
abstract boolean |
isLinux() |
abstract boolean |
isMacOS() |
abstract boolean |
isMozilla40Compatible() |
abstract boolean |
isMozilla45Compatible() |
abstract boolean |
isMozilla50Compatible() |
abstract boolean |
isNetscape()
Browser is Netscape?
ブラウザは Netscape ですか?
|
abstract boolean |
isNotNetscape()
Browser is not Netscape?
ブラウザは Netscape ではないか?
|
abstract boolean |
isOmniWeb()
Browser is OmniWeb?
ブラウザは OmniWeb ですか?
|
abstract boolean |
isOpera()
Browser is Opera?
ブラウザは Opera ですか?
|
abstract boolean |
isRobot()
Browser is isRobot?
ブラウザはロボットですか?
|
abstract boolean |
isSafari()
Browser is Safari?
ブラウザは Safari ですか?
|
abstract boolean |
isUnknownBrowser()
未知のブラウザ?
|
abstract boolean |
isUnknownPlatform() |
abstract boolean |
isVersion2() |
abstract boolean |
isVersion3() |
abstract boolean |
isVersion4() |
abstract boolean |
isVersion40() |
abstract boolean |
isVersion41() |
abstract boolean |
isVersion45() |
abstract boolean |
isVersion5() |
abstract boolean |
isVersion51() |
abstract boolean |
isVersion6() |
abstract boolean |
isVersion7() |
abstract boolean |
isVersion8() |
abstract boolean |
isVersion9() |
abstract boolean |
isWindows() |
abstract Integer |
majorVersion()
Major version
|
ERXMessageEncoding |
messageEncodingForLanguage(String language)
Gets the message encoding for a given language.
|
ERXMessageEncoding |
messageEncodingForLanguages(NSArray languages)
Gets the message encoding for a given array of languages.
|
ERXMessageEncoding |
messageEncodingForRequest(WORequest request)
Gets the message encoding for a given request.
|
abstract String |
mozillaVersion()
MozillaVersion string
ブラウザの Mozilla バージョンを戻します
|
abstract String |
platform()
Platform string
プラットフォームを戻します
|
void |
takeValueForKey(Object value,
String key) |
String |
toString() |
abstract NSDictionary |
userInfo()
UserInfo dictionary
UserInfo ディクショナリーを戻します
|
Object |
valueForKey(String key) |
abstract String |
version()
Version string
ブラウザのバージョンアップを戻します
|
public static final String UNKNOWN_BROWSER
public static final String ROBOT
public static final String ICAB
public static final String EDGE
public static final String IE
public static final String NETSCAPE
public static final String OMNIWEB
public static final String OPERA
public static final String SAFARI
public static final String MOZILLA
public static final String CHROME
public static final String FIREFOX
public static final String UNKNOWN_VERSION
public static final String UNKNOWN_PLATFORM
public static final String MACOS
public static final String WINDOWS
public static final String LINUX
public static final String ANDROID
public static final String IPHONE
public static final String IPAD
public static final String POWER_PC
public static final String UNKNOWN_CPU
public static final String NO_GECKO
public abstract String browserName()
public abstract String version()
public abstract Integer majorVersion()
public abstract String mozillaVersion()
public abstract String geckoRevision()
public abstract String platform()
public abstract NSDictionary userInfo()
public abstract boolean isUnknownBrowser()
public abstract boolean isRobot()
public abstract boolean isICab()
public abstract boolean isEdge()
public abstract boolean isIE()
public abstract boolean isNetscape()
public abstract boolean isNotNetscape()
public abstract boolean isOmniWeb()
public abstract boolean isOpera()
public abstract boolean isSafari()
public abstract boolean isFirefox()
public abstract boolean isChrome()
public abstract boolean isMozilla50Compatible()
public abstract boolean isMozilla45Compatible()
public abstract boolean isMozilla40Compatible()
public abstract boolean isVersion9()
public abstract boolean isVersion8()
public abstract boolean isVersion7()
public abstract boolean isVersion6()
public abstract boolean isVersion5()
public abstract boolean isVersion51()
public abstract boolean isVersion45()
public abstract boolean isVersion41()
public abstract boolean isVersion40()
public abstract boolean isVersion4()
public abstract boolean isVersion3()
public abstract boolean isVersion2()
public abstract boolean isUnknownPlatform()
public abstract boolean isMacOS()
public abstract boolean isWindows()
public abstract boolean isLinux()
public abstract boolean isAndroid()
public abstract boolean isIPhone()
public abstract boolean isIPad()
public ERXMessageEncoding messageEncodingForRequest(WORequest request)
request
- public ERXMessageEncoding messageEncodingForLanguages(NSArray languages)
languages
- public ERXMessageEncoding messageEncodingForLanguage(String language)
language
- public String formValueEncoding()
public Object valueForKey(String key)
valueForKey
in interface NSKeyValueCoding
public void takeValueForKey(Object value, String key)
takeValueForKey
in interface NSKeyValueCoding
Copyright © 2002 – 2024 Project Wonder.