com.opera.core.systems.scope
Class AbstractService

java.lang.Object
  extended by com.opera.core.systems.scope.AbstractService
Direct Known Subclasses:
CookieManager, CoreUtils, DesktopUtils, DesktopWindowManager, EcmaScriptDebugger, EcmascriptService, OperaExec, Prefs, Selftest, SystemInputManager, WindowManager

public abstract class AbstractService
extends java.lang.Object

All scope services derive from this base class for generic operations

Author:
Deniz Turkoglu

Field Summary
protected  ScopeServices services
           
 
Constructor Summary
AbstractService(ScopeServices services, java.lang.String version)
           
 
Method Summary
static com.google.protobuf.GeneratedMessage.Builder<?> buildPayload(UmsProtos.Response response, com.google.protobuf.GeneratedMessage.Builder<?> builder)
           
 UmsProtos.Response executeCommand(ICommand command, com.google.protobuf.AbstractMessage.Builder<?> builder)
           
 UmsProtos.Response executeCommand(ICommand command, com.google.protobuf.AbstractMessage.Builder<?> builder, long timeout)
           
 java.lang.String getVersion()
           
 boolean isVersionInRange(java.lang.String version, java.lang.String maxVersion, java.lang.String serviceName)
          Returns true if the given version is less than the maximum given version and greater than the minimum version set in the ScopeServices constructor by OperaDriver.
static void sleep(long timeInMillis)
           
 java.util.Iterator<?> xpathIterator(java.util.Collection<?> collection, java.lang.String query)
          Query a collection JXPath and return a pointer FIXME: This does not belong here!
 org.apache.commons.jxpath.Pointer xpathPointer(java.util.Collection<?> collection, java.lang.String query)
          Query a collection JXPath and return a pointer FIXME: This does not belong here!
 java.lang.Object xpathQuery(java.util.Collection<?> collection, java.lang.String query)
          Query a collection with JXPath and return value of node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

services

protected ScopeServices services
Constructor Detail

AbstractService

public AbstractService(ScopeServices services,
                       java.lang.String version)
Method Detail

getVersion

public java.lang.String getVersion()

sleep

public static void sleep(long timeInMillis)

isVersionInRange

public boolean isVersionInRange(java.lang.String version,
                                java.lang.String maxVersion,
                                java.lang.String serviceName)
Returns true if the given version is less than the maximum given version and greater than the minimum version set in the ScopeServices constructor by OperaDriver.

Parameters:
version - Service version
maxVersion - Maximum version for the service
serviceName - Name of the service (used for the error message)

executeCommand

public UmsProtos.Response executeCommand(ICommand command,
                                         com.google.protobuf.AbstractMessage.Builder<?> builder)

executeCommand

public UmsProtos.Response executeCommand(ICommand command,
                                         com.google.protobuf.AbstractMessage.Builder<?> builder,
                                         long timeout)

xpathQuery

public java.lang.Object xpathQuery(java.util.Collection<?> collection,
                                   java.lang.String query)
Query a collection with JXPath and return value of node

Parameters:
query - a valid XPath query
Returns:
result

xpathPointer

public org.apache.commons.jxpath.Pointer xpathPointer(java.util.Collection<?> collection,
                                                      java.lang.String query)
Query a collection JXPath and return a pointer FIXME: This does not belong here!

Returns:
Pointer to node

xpathIterator

public java.util.Iterator<?> xpathIterator(java.util.Collection<?> collection,
                                           java.lang.String query)
Query a collection JXPath and return a pointer FIXME: This does not belong here!

Returns:
Pointer to node

buildPayload

public static final com.google.protobuf.GeneratedMessage.Builder<?> buildPayload(UmsProtos.Response response,
                                                                                 com.google.protobuf.GeneratedMessage.Builder<?> builder)


Copyright © 2011. All Rights Reserved.