com.sapportals.portal.useragent

Interface IUserAgentService


Deprecated. Use the UserAgent in project uicore

public interface IUserAgentService

The interface that represents the user agent service. This interface provides methods for accessing and creating the user agent interfaces.


Nested Class Summary
static interface IUserAgentService.IDTextPair
          Deprecated. The class that stores an ID-text pair containing the user agent type ID and a friendly name.
 
Field Summary
static String KEY
          Deprecated. The key used when running in a portal environment.
 
Method Summary
 IUserAgentSet createUserAgentSet(String name, String includedPatternExpr, String excludedPatternExpr)
          Deprecated. Creates a user agent set with a specified name and for the specified pattern expressions.
 IUserAgentService.IDTextPair[] getAllKnownPlatforms(Locale locale)
          Deprecated. Gets an array of all known user agent platforms as translated by the resource bundle.
 IUserAgentService.IDTextPair[] getAllKnownTypes(Locale locale)
          Deprecated. Gets an array of all known user agent types as translated by the resource bundle.
 IUserAgentService getNewInstance()
          Deprecated. Gets a new instance of the user agent service (a clone).
 IUserAgent getUserAgent(String userAgentString)
          Deprecated. Gets the user agent for the specified user agent string.
 IUserAgentFamily getUserAgentFamily()
          Deprecated. 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)
          Deprecated. Gets a predefined user agent set with the specified name.
 

Field Detail

KEY

static final String KEY
Deprecated. 
The key used when running in a portal environment.

See Also:
Constant Field Values
Method Detail

getNewInstance

IUserAgentService getNewInstance()
Deprecated. 
Gets a new instance of the user agent service (a clone). The new instance resides in its own memory space so that the new instance of the user agent family is not linked to the original instance.
It is possible to have several unlinked user agent families each with a different user agent set.

Returns:
an instance of the user agent service
See Also:
IUserAgentFamily

getUserAgent

IUserAgent getUserAgent(String userAgentString)
Deprecated. 
Gets the user agent for the specified user agent string. The user agent string is defined in RFC 2616 Hypertext Transfer Protocol -- HTTP/1.1", chap. 14.43.

Parameters:
userAgentString - a user agent string
Returns:
the user agent
See Also:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43, IUserAgent, IPortalComponentRequest

createUserAgentSet

IUserAgentSet createUserAgentSet(String name,
                                 String includedPatternExpr,
                                 String excludedPatternExpr)
                                 throws UserAgentSetException,
                                        UserAgentPatternParserException
Deprecated. 
Creates a user agent set with a specified name and for the specified pattern expressions. The user agent name can be used in subsequent user agent set definitions. The created user agent set is added to the user agent family. The parameter includedPatternExpr describes the set of included user agents. The parameter excludedPatternExpr describes the set of excluded user agents.
A user agent is included in this set if:
  1. it matches at least one of the including pattern expressions, and
  2. it does not match one of the excluding pattern expressions.
The expression grammar is as follows:
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_IDa pattern name is an identifier
P_ID::=JAVA_IDENTIFIERthe 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_IDa type pattern is either a wildcard or an ID with an optional prefixed comparator
P_VERS::='*' | CMP_2? P_NUMa version pattern is either a wildcard or a number with an optional prefixed comparator
P_PLAT::='*' | CMP_1? P_IDa 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_FLOATthe syntax of a number is the same as for a float in Java

Parameters:
name - a user agent set name
Returns:
a user agent set
Throws:
UserAgentSetException - if a user agent set with the same name already exists
UserAgentPatternParserException - if the pattern expressions contain syntax errors
See Also:
IUserAgentSet

getUserAgentSetForName

IUserAgentSet getUserAgentSetForName(String name)
Deprecated. 
Gets a predefined user agent set with the specified name.

Parameters:
name - a user agent set name
Returns:
the user agent set, null if not found
See Also:
IUserAgentSet

getUserAgentFamily

IUserAgentFamily getUserAgentFamily()
Deprecated. 
Gets the user agent family for this instance that is the superset of all user agent sets that are defined by this instance.
The user agent family is automatically constructed by the creation of a user agent set.

Returns:
the user agent family
See Also:
IUserAgentFamily

getAllKnownTypes

IUserAgentService.IDTextPair[] getAllKnownTypes(Locale locale)
Deprecated. 
Gets an array of all known user agent types as translated by the resource bundle.

Parameters:
locale - the type locale
Returns:
an array of all known user agent types in a pair (ID, friendly name)
See Also:
IUserAgentConstants

getAllKnownPlatforms

IUserAgentService.IDTextPair[] getAllKnownPlatforms(Locale locale)
Deprecated. 
Gets an array of all known user agent platforms as translated by the resource bundle.

Parameters:
locale - the platform locale
Returns:
an array of all known user agent types in a pair (ID, friendly name)
See Also:
IUserAgentConstants
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS [sap.com] tc/ep/useragent/api api EP-PIN


Copyright 2015 SAP AG Complete Copyright Notice