public interface IUserAgentService
| Modifier and Type | Interface and Description |
|---|---|
static interface |
IUserAgentService.IDTextPair
The class that stores an ID-text pair containing the user agent type ID
and a friendly name.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY
The key used when running in a portal environment.
|
| Modifier and Type | Method and Description |
|---|---|
IUserAgentSet |
createUserAgentSet(String name,
String includedPatternExpr,
String excludedPatternExpr)
Creates a user agent set with a specified name and for the specified
pattern expressions.
|
IUserAgentService.IDTextPair[] |
getAllKnownPlatforms(Locale locale)
Gets an array of all known user agent platforms as translated by the
resource bundle.
|
IUserAgentService.IDTextPair[] |
getAllKnownTypes(Locale locale)
Gets an array of all known user agent types as translated by the resource
bundle.
|
IUserAgentService |
getNewInstance()
Gets a new instance of the user agent service (a clone).
|
IUserAgent |
getUserAgent(String userAgentString)
Gets the user agent for the specified user agent string.
|
IUserAgentFamily |
getUserAgentFamily()
Gets the user agent family for this instance that is the superset of all
user agent sets that are defined by this instance.
|
IUserAgentSet |
getUserAgentSetForName(String name)
Gets a predefined user agent set with the specified name.
|
static final String KEY
IUserAgentService getNewInstance()
IUserAgentFamilyIUserAgent getUserAgent(String userAgentString)
userAgentString - a user agent stringIUserAgent,
IPortalComponentRequestIUserAgentSet createUserAgentSet(String name, String includedPatternExpr, String excludedPatternExpr) throws UserAgentSetException, UserAgentPatternParserException
includedPatternExpr
describes the set of included user agents. The parameter
excludedPatternExpr describes the set of excluded user agents.
| EXPR_STR | ::= | P_EXPR* | the whole pattern expression string |
| P_EXPR | ::= | WS (P_NAME | P_UA) | a list of pattern names or user agent patterns |
| P_NAME | ::= | P_ID | a pattern name is an identifier |
| P_ID | ::= | JAVA_IDENTIFIER | the syntax of an ID is the same as in Java |
| P_UA | ::= | '(' WS P_TYPE WS ',' WS P_VERS WS ',' WS P_PLAT WS ')' | a user agent pattern contains pattern type, version and platform |
| P_TYPE | ::= | '*' | CMP_1? P_ID | a type pattern is either a wildcard or an ID with an optional prefixed comparator |
| P_VERS | ::= | '*' | CMP_2? P_NUM | a version pattern is either a wildcard or a number with an optional prefixed comparator |
| P_PLAT | ::= | '*' | CMP_1? P_ID | a platform pattern is either a wildcard or an ID with an optional prefixed comparator |
| CMP_1 | ::= | '=' | '!' | the simple comparator is either equal or unequal |
| CMP_2 | ::= | '=' | '!' | '<' | '<=' | '>' | '>=' | the complex comparator is one of = ! < > <= >= |
| P_NUM | ::= | JAVA_FLOAT | the syntax of a number is the same as for a float in Java |
name - a user agent set nameUserAgentSetException - if a user agent set with the same
name already existsUserAgentPatternParserException - if the pattern expressions
contain syntax errorsIUserAgentSetIUserAgentSet getUserAgentSetForName(String name)
name - a user agent set nameIUserAgentSetIUserAgentFamily getUserAgentFamily()
IUserAgentFamilyIUserAgentService.IDTextPair[] getAllKnownTypes(Locale locale)
locale - the type localeIUserAgentConstantsIUserAgentService.IDTextPair[] getAllKnownPlatforms(Locale locale)
locale - the platform localeIUserAgentConstants| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] EP-BASIS
|
[sap.com] tc/ep/useragent/api
|
api
|
EP-PIN
|
Copyright 2021 SAP SE Complete Copyright Notice