Client - public abstract class DSLProtocol<Client> extends DSLWrapper<Client> implements DSL<Client>
contentService, dataContent, jmxBuilder, LOG| Constructor and Description |
|---|
DSLProtocol() |
| Modifier and Type | Method and Description |
|---|---|
Client |
and() |
DSLAssertion |
assertThat() |
abstract Client |
authenticateUser(UserModel userModel) |
String |
buildPath(String parent,
String... paths) |
protected String |
buildSiteDocumentLibraryPath(String siteId,
String... filesOrFoldersHierarcy) |
protected String |
buildUserHomePath(String username,
String... filesOrFoldersHierarcy) |
Client |
closeJmxConnection() |
abstract Client |
disconnect() |
String |
getCurrentSpace() |
UserModel |
getCurrentUser()
gets the current test user
|
abstract String |
getDataDictionaryPath() |
ContentModel |
getLastContentModel() |
String |
getLastResource()
Returns the last ContentModel resource created within alfresco repository
This will return the full path so something like:
or ->
smb://172.29.100.215/alfresco/Sites/qcAqgLSMO2OU5txtPMQG/documentLibrary/
/folder-syKFUjMWgY if CIFS protocol is used
|
String |
getLastResourceWithoutPrefix()
The same as
getLastResource() but without the repository prefix
So if the lastResource is
smb://172.29.100.215/alfresco/Sites/qcAqgLSMO2OU5txtPMQG/documentLibrary/
folder-syKFUjMWgY we will return only
"/Sites/qcAqgLSMO2OU5txtPMQG/documentLibrary//folder-syKFUjMWgY" without
"smb://172.29.100.215/alfresco" prefix defined in getPrefixSpace() method |
abstract String |
getPrefixSpace() |
protected abstract String |
getProtocolJMXConfigurationStatus()
get the current status true/false of the protocol on test server
|
String |
getProtocolName() |
abstract String |
getRootPath() |
abstract String |
getSitesPath() |
abstract String |
getUserHomesPath() |
boolean |
isProtocolEnabled() |
Client |
setCurrentSpace(String currentRepositorySpace)
DSL.getSitesPath(), DSL.getUserHomesPath(), DSL.getDataDictionaryPath(), etc If nothing is
specified, the root folder is used |
void |
setLastContentModel(ContentModel lastContentModel)
The last ContentModel tested from
usingResource(ContentModel) |
void |
setLastResource(String fullPath)
The last resource should be the full path of the last file/folder used in
tests
|
Client |
then() |
Client |
usingAdmin()
Defines the current user to be Admin
|
abstract Client |
usingResource(ContentModel model)
Operations on files or folders If you call this method you can use all
assertion within this wrapper
|
Client |
usingRoot() |
abstract Client |
usingSite(SiteModel siteModel)
Defines the current test site to be used based on
SiteModel |
abstract Client |
usingSite(String siteId)
User for changing current site location This method will build the path
of the siteId location Example: /Sites/
|
Client |
usingUser(UserModel user)
Defines the current test user that will be used
|
abstract Client |
usingUserHome() |
abstract Client |
usingUserHome(String username)
Defines the current User Home to be used Example: /User Homes/
|
Client |
waitSeconds(int seconds) |
Client |
when() |
getDataContentService, getTestUser, setTestUserpublic Client usingUser(UserModel user) throws Exception
DSLpublic Client usingAdmin() throws Exception
DSLusingAdmin in interface DSL<Client>Exceptionpublic UserModel getCurrentUser()
DSLgetCurrentUser in interface DSL<Client>protected String buildSiteDocumentLibraryPath(String siteId, String... filesOrFoldersHierarcy) throws TestConfigurationException
siteId - filesOrFoldersHierarcy - TestConfigurationExceptionprotected String buildUserHomePath(String username, String... filesOrFoldersHierarcy) throws TestConfigurationException
siteId - filesOrFoldersHierarcy - TestConfigurationExceptionpublic String getCurrentSpace() throws TestConfigurationException
getCurrentSpace in interface DSL<Client>TestConfigurationExceptionpublic Client setCurrentSpace(String currentRepositorySpace)
DSLDSL.getSitesPath(), DSL.getUserHomesPath(), DSL.getDataDictionaryPath(), etc If nothing is
specified, the root folder is usedsetCurrentSpace in interface DSL<Client>public Client closeJmxConnection() throws IOException
IOExceptionprotected abstract String getProtocolJMXConfigurationStatus() throws Exception
Exceptionpublic boolean isProtocolEnabled()
throws Exception
Exceptionpublic String getLastResource()
public String getLastResourceWithoutPrefix()
getLastResource() but without the repository prefix
So if the lastResource is
smb://172.29.100.215/alfresco/Sites/qcAqgLSMO2OU5txtPMQG/documentLibrary/
folder-syKFUjMWgY we will return only
"/Sites/qcAqgLSMO2OU5txtPMQG/documentLibrary//folder-syKFUjMWgY" without
"smb://172.29.100.215/alfresco" prefix defined in getPrefixSpace() methodpublic void setLastResource(String fullPath)
fullPath - public String getProtocolName()
public Client and()
public Client then()
public Client when()
public abstract Client authenticateUser(UserModel userModel) throws Exception
Exceptionpublic abstract Client usingSite(String siteId) throws Exception
public abstract Client usingSite(SiteModel siteModel) throws Exception
DSLSiteModelpublic abstract Client usingUserHome(String username) throws Exception
DSLusingUserHome in interface DSL<Client>Exceptionpublic abstract Client usingUserHome() throws Exception
usingUserHome in interface DSL<Client>DSL.getCurrentUser()Exceptionpublic abstract String getRootPath() throws TestConfigurationException
getRootPath in interface DSL<Client>TestConfigurationExceptionpublic abstract String getSitesPath() throws TestConfigurationException
getSitesPath in interface DSL<Client>TestConfigurationExceptionpublic abstract String getUserHomesPath() throws TestConfigurationException
getUserHomesPath in interface DSL<Client>TestConfigurationExceptionpublic abstract String getDataDictionaryPath() throws TestConfigurationException
getDataDictionaryPath in interface DSL<Client>TestConfigurationExceptionpublic abstract String getPrefixSpace()
public abstract Client usingResource(ContentModel model) throws Exception
usingResource in interface DSL<Client>model - Exceptionpublic DSLAssertion assertThat()
public Client waitSeconds(int seconds)
public ContentModel getLastContentModel()
public void setLastContentModel(ContentModel lastContentModel)
usingResource(ContentModel)lastContentModel - Copyright © 2005–2019 Alfresco Software. All rights reserved.