public class LspsRemote extends Object
Module
, then use Module
's methods to control the module.
Expects that there is an administrator user created in the LSPS server, with username/password admin/admin. All static methods
return services authenticated as admin/admin; you can call create(String, String)
to obtain instance which
authenticates as another user.Modifier and Type | Field and Description |
---|---|
static LspsRemote |
ADMIN
The admin/admin connection.
|
static String |
baseUrl |
static String |
url |
static String |
urlHuman |
Modifier | Constructor and Description |
---|---|
protected |
LspsRemote(String username,
String password) |
Modifier and Type | Method and Description |
---|---|
static LspsRemote |
create(String username,
String password) |
static LspsRemote |
create(TestPerson person,
String password) |
GenericDocumentService |
getDocumentService()
Returns the document service for this user which retrieves documents available to this user.
|
List<String> |
getDocumentTitles()
Calls
GenericDocumentService.getAllDocuments() and retrieves document names. |
static PersonManagementService |
getPersonManagementService()
Provides methods for person management (creating, updating, removing
persons), person-role mapping and querying, and role querying.
|
static TestSupportService |
getTestSupportService()
Returns
TestSupportService . |
List<Todo> |
getTodoList()
Returns the current user to-do list.
|
static List<Todo> |
getTodoList(TestPerson person)
Returns the current to-do list of given person.
|
static TodoService |
getTodoService()
Deprecated.
call
ADMIN 's getTodoServiceUser() |
TodoService |
getTodoServiceUser()
Service for accessing the functionality related to to-dos.
|
static boolean |
isRunningOn(JEEServer server) |
boolean |
isRunningOnServer(JEEServer server) |
static void |
unloadAllModules()
Unloads all modules from the server.
|
static Module |
uploadModule(String name,
String version,
File pathToProject)
Uploads a model to the server.
|
static Module |
uploadModule(String name,
String version,
File pathToProject,
SchemaUpdateStrategy strategy)
Uploads a model to the server.
|
static Module |
uploadModuleFromRepository(String name,
String version)
Uploads a model to the server.
|
static Module |
uploadModuleFromRepository(String name,
String version,
SchemaUpdateStrategy strategy)
Uploads a model to the server.
|
public static final String baseUrl
public static final String url
public static final String urlHuman
public static final LspsRemote ADMIN
public static LspsRemote create(TestPerson person, String password)
public static LspsRemote create(String username, String password)
public static Module uploadModuleFromRepository(String name, String version)
name
- the module name, not null.version
- the version, not null. Just type "1.0" here.public static Module uploadModuleFromRepository(String name, String version, SchemaUpdateStrategy strategy)
name
- the module name, not null.version
- the version, not null. Just type "1.0" here.strategy
- the database update strategy to use, not null.public static Module uploadModule(String name, String version, File pathToProject)
pathToProject
,
zips it and sends it to the server.
Uses the DROP-CREATE database update strategy.name
- the module name, not null. The module must be present in the project denoted by pathToProject
.version
- the version, not null. Just type "1.0" here.pathToProject
- the path to the folder containing the .project file and modules.public static Module uploadModule(String name, String version, File pathToProject, SchemaUpdateStrategy strategy)
pathToProject
,
zips it and sends it to the server.name
- the module name, not null. The module must be present in the project denoted by pathToProject
.version
- the version, not null. Just type "1.0" here.pathToProject
- the path to the folder containing the .project file and modules.strategy
- the database update strategy to use, not null.public static void unloadAllModules()
public static TestSupportService getTestSupportService()
TestSupportService
.public static PersonManagementService getPersonManagementService()
@Deprecated public static TodoService getTodoService()
ADMIN
's getTodoServiceUser()
getTodoList(TestPerson)
or UITester.getTodoList()
. As this method may be easily misused, it is marked deprecated;
please call getTodoServiceUser()
on an explicit instance of LspsRemote
.public TodoService getTodoServiceUser()
public static List<Todo> getTodoList(TestPerson person) throws PersonNotFoundException
person
- the person for which to retrievePersonNotFoundException
- if no person with the given personId
existspublic List<Todo> getTodoList() throws PersonNotFoundException
PersonNotFoundException
- if no person with the given personId
existspublic GenericDocumentService getDocumentService()
public List<String> getDocumentTitles() throws ErrorException
GenericDocumentService.getAllDocuments()
and retrieves document names.ErrorException
public boolean isRunningOnServer(JEEServer server)
server
- public static boolean isRunningOn(JEEServer server)
Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.