本文整理汇总了Java中org.wso2.carbon.integration.common.utils.LoginLogoutClient.login方法的典型用法代码示例。如果您正苦于以下问题:Java LoginLogoutClient.login方法的具体用法?Java LoginLogoutClient.login怎么用?Java LoginLogoutClient.login使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.wso2.carbon.integration.common.utils.LoginLogoutClient
的用法示例。
在下文中一共展示了LoginLogoutClient.login方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setEnvironment
import org.wso2.carbon.integration.common.utils.LoginLogoutClient; //导入方法依赖的package包/类
@BeforeClass(alwaysRun = true)
public void setEnvironment() throws Exception {
init(); //init master class
bpelPackageManagementClient = new BpelPackageManagementClient(backEndUrl, sessionCookie);
humanTaskPackageManagementClient = new HumanTaskPackageManagementClient(backEndUrl, sessionCookie);
requestSender = new RequestSender();
initialize();
//initialize HT Client API for Clerk1 user
AutomationContext clerk1AutomationContext = new AutomationContext("BPS", "bpsServerInstance0001",
FrameworkConstants.SUPER_TENANT_KEY, "clerk1");
LoginLogoutClient clerk1LoginLogoutClient = new LoginLogoutClient(clerk1AutomationContext);
String clerk1SessionCookie = clerk1LoginLogoutClient.login();
clerk1HumanTaskClientApiClient = new HumanTaskClientApiClient(backEndUrl, clerk1SessionCookie);
//initialize HT Client API for Manager1 user
AutomationContext manager1AutomationContext = new AutomationContext("BPS", "bpsServerInstance0001",
FrameworkConstants.SUPER_TENANT_KEY, "manager1");
LoginLogoutClient manager1LoginLogoutClient = new LoginLogoutClient(manager1AutomationContext);
String manager1SessionCookie = manager1LoginLogoutClient.login();
manager1HumanTaskClientApiClient = new HumanTaskClientApiClient(backEndUrl, manager1SessionCookie);
}
示例2: serviceDeployment
import org.wso2.carbon.integration.common.utils.LoginLogoutClient; //导入方法依赖的package包/类
@BeforeClass(alwaysRun = true)
public void serviceDeployment() throws Exception {
super.init();
serverConfigurationManager = new ServerConfigurationManager(dssContext);
serverConfigurationManager.copyToComponentLib(new File(getResourceLocation() + File.separator + "jar" + File.separator
+ "roleRetriever-1.0.0.jar"));
serverConfigurationManager.restartForcefully();
LoginLogoutClient loginLogoutClient = new LoginLogoutClient(dssContext);
sessionCookie = loginLogoutClient.login();
List<File> sqlFileLis = new ArrayList<File>();
sqlFileLis.add(selectSqlFile("CreateEmailUsersTable.sql"));
deployService(serviceName,
createArtifact(getResourceLocation() + File.separator + "dbs" + File.separator
+ "rdbms" + File.separator + "h2" + File.separator
+ serviceName + ".dbs", sqlFileLis));
serviceEndPoint = getServiceUrlHttp(serviceName);
}
示例3: configureNode
import org.wso2.carbon.integration.common.utils.LoginLogoutClient; //导入方法依赖的package包/类
private void configureNode(AutomationContext node) throws Exception {
String backendURL = node.getContextUrls().getBackEndUrl();
LoginLogoutClient loginLogoutClient = new LoginLogoutClient(node);
String loggedInSessionCookie = loginLogoutClient.login();
eventReceiverAdminServiceClient = configurationUtil.getEventReceiverAdminServiceClient(backendURL, loggedInSessionCookie);
eventPublisherAdminServiceClient = configurationUtil.getEventPublisherAdminServiceClient(backendURL, loggedInSessionCookie);
eventProcessorAdminServiceClient = configurationUtil.getEventProcessorAdminServiceClient(backendURL, loggedInSessionCookie);
eventStreamManagerAdminServiceClient = configurationUtil.getEventStreamManagerAdminServiceClient(backendURL, loggedInSessionCookie);
log.info("Adding stream definitions");
defineStreams();
log.info("Adding event receiver analyticsWso2EventReceiver");
addEventReceiver("analyticsWso2EventReceiver.xml");
log.info("Adding event receiver stockQuoteWso2EventReceiver");
addEventReceiver("stockQuoteWso2EventReceiver.xml");
log.info("Adding event publisher fortuneCompanyWSO2EventPublisher");
addEventPublisher("fortuneCompanyWSO2EventPublisher.xml");
log.info("Adding execution plan");
addExecutionPlan("PreprocessStats.siddhiql");
}
示例4: init
import org.wso2.carbon.integration.common.utils.LoginLogoutClient; //导入方法依赖的package包/类
/**
* @param path path of the collection or resource to be subscribed
* @param eventType event to be subscribed
* @return true if the required jmx notification is generated for
* subscription, false otherwise
* @throws Exception
*/
public boolean init(String path, String eventType, AutomationContext autoContext)
throws Exception {
automationContext = autoContext;
backEndUrl = automationContext.getContextUrls().getBackEndUrl();
LoginLogoutClient loginLogoutClient = new LoginLogoutClient(automationContext);
sessionCookie = loginLogoutClient.login();
userName = automationContext.getContextTenant().getContextUser().getUserName();
if (userName.contains("@")){
userNameWithoutDomain = userName.substring(0, userName.indexOf('@'));
}
else {
userNameWithoutDomain = userName;
}
boolean result = JMXSubscribe(path, eventType) && update(path) && getJMXNotification();
clean(path);
return result;
}
示例5: init
import org.wso2.carbon.integration.common.utils.LoginLogoutClient; //导入方法依赖的package包/类
/**
* Subscribe for management console notifications and receive the
* notification
*
* @param path path of the resource or collection
* @param eventType event type to be subscribed
* @param env ManageEnvironment
* @param userInf UserInfo
* @return true if the subscription is succeeded and notification is
* received, false otherwise
* @throws Exception
*/
public static boolean init(String path, String eventType, AutomationContext autoContext)
throws Exception {
automationContext = autoContext;
backEndUrl = automationContext.getContextUrls().getBackEndUrl();
LoginLogoutClient loginLogoutClient = new LoginLogoutClient(automationContext);
sessionCookie = loginLogoutClient.login();
userName = automationContext.getContextTenant().getContextUser().getUserName();
if (userName.contains("@"))
userNameWithoutDomain = userName.substring(0, userName.indexOf('@'));
else
userNameWithoutDomain = userName;
boolean result = (addRole() && consoleSubscribe(path, eventType) && update(path) && getNotification(path));
clean(path);
return result;
}
示例6: init
import org.wso2.carbon.integration.common.utils.LoginLogoutClient; //导入方法依赖的package包/类
protected void init() throws Exception {
ssServer = new AutomationContext(PRODUCT_GROUP_NAME, TestUserMode.SUPER_TENANT_ADMIN);
loginLogoutClient = new LoginLogoutClient(ssServer);
sessionCookie = loginLogoutClient.login();
backendURL = ssServer.getContextUrls().getBackEndUrl();
this.driver = BrowserManager.getWebDriver();
}
示例7: init
import org.wso2.carbon.integration.common.utils.LoginLogoutClient; //导入方法依赖的package包/类
protected void init(TestUserMode testUserMode) throws Exception {
bpsServer = new AutomationContext("BPS", testUserMode);
loginLogoutClient = new LoginLogoutClient(bpsServer);
sessionCookie = loginLogoutClient.login();
backEndUrl = bpsServer.getContextUrls().getBackEndUrl();
serviceUrl = bpsServer.getContextUrls().getServiceUrl();
bpelUploaderClient = new BpelUploaderClient(backEndUrl, sessionCookie);
humanTaskUploaderClient = new HumanTaskUploaderClient(backEndUrl, sessionCookie);
bpmnUploaderClient = new BPMNUploaderClient(backEndUrl, sessionCookie);
}
示例8: setupTestClients
import org.wso2.carbon.integration.common.utils.LoginLogoutClient; //导入方法依赖的package包/类
/**
* Setup
*
* @throws Exception
*/
private void setupTestClients() throws Exception {
init();
requestSender.waitForProcessDeployment(backEndUrl + HumanTaskTestConstants.CLAIM_APPROVAL_PROCESS_SERVICE);
requestSender.waitForProcessDeployment(backEndUrl + HumanTaskTestConstants.CLAIM_SERVICE);
log.info("BPEL and Humantask services are up and running");
// Need to re-initialize since we have restarted the server
bpelPackageManagementClient = new BpelPackageManagementClient(backEndUrl, sessionCookie);
humanTaskPackageManagementClient = new HumanTaskPackageManagementClient(backEndUrl, sessionCookie);
instanceManagementClient = new BpelInstanceManagementClient(backEndUrl, sessionCookie);
log.info("Server setting up completed ...!!!");
serverConfigurationManager = new ServerConfigurationManager(bpsServer);
//initialize HT Client API for Clerk1 and manager1 user
AutomationContext clerk1AutomationContext =
new AutomationContext("BPS", "bpsServerInstance0001", FrameworkConstants.SUPER_TENANT_KEY,
HumanTaskTestConstants.CLERK1_USER);
LoginLogoutClient clerk1LoginLogoutClient = new LoginLogoutClient(clerk1AutomationContext);
String clerk1SessionCookie = clerk1LoginLogoutClient.login();
clerk1HumanTaskClientApiClient = new HumanTaskClientApiClient(backEndUrl, clerk1SessionCookie);
AutomationContext manager1AutomationContext =
new AutomationContext("BPS", "bpsServerInstance0001", FrameworkConstants.SUPER_TENANT_KEY,
HumanTaskTestConstants.MANAGER1_USER);
LoginLogoutClient manager1LoginLogoutClient = new LoginLogoutClient(manager1AutomationContext);
String manager1SessionCookie = manager1LoginLogoutClient.login();
manager1HumanTaskClientApiClient = new HumanTaskClientApiClient(backEndUrl, manager1SessionCookie);
}
示例9: init
import org.wso2.carbon.integration.common.utils.LoginLogoutClient; //导入方法依赖的package包/类
protected void init(TestUserMode userType) throws Exception {
// dssContext = new AutomationContext("DSS", "dss01", "carbon.supper", "admin");
dssContext = new AutomationContext(PRODUCT_NAME, userType);
LoginLogoutClient loginLogoutClient = new LoginLogoutClient(dssContext);
sessionCookie = loginLogoutClient.login();
//return the current tenant as the userType(TestUserMode)
tenantInfo = dssContext.getContextTenant();
//return the user information initialized with the system
userInfo = tenantInfo.getContextUser();
}
示例10: serviceDeployment
import org.wso2.carbon.integration.common.utils.LoginLogoutClient; //导入方法依赖的package包/类
@BeforeClass(alwaysRun = true)
public void serviceDeployment() throws Exception {
super.init();
List<File> sqlFileLis = new ArrayList<File>();
sqlFileLis.add(selectSqlFile("CreateEmailUsersTable.sql"));
deployService(serviceName,
createArtifact(getResourceLocation() + File.separator + "samples" + File.separator
+ "dbs" + File.separator + "rdbms" + File.separator
+ serviceName + ".dbs", sqlFileLis));
backendUrl = dssContext.getContextUrls().getBackEndUrl();
/* login to the server as super user and add user with email user name for the test case */
userManagementClient = new UserManagementClient(backendUrl,sessionCookie);
userManagementClient.addRole("sampleRole", new String[]{},new String[]{"admin"});
userManagementClient.addUser("[email protected]","test123",new String[]{"sampleRole"},"emailUserProfile");
serverConfigurationManager = new ServerConfigurationManager(dssContext);
serverConfigurationManager.copyToComponentLib(new File(getResourceLocation()
+ File.separator + "jar" + File.separator
+ "msgContextHandler-1.0.0.jar"));
String carbonHome = System.getProperty("carbon.home");
File sourceFile = new File(getResourceLocation()
+ File.separator + "serverConfigs" + File.separator
+ "axis2.xml");
File destinationFile = new File(carbonHome + File.separator + "conf" + File.separator + "axis2"+ File.separator + "axis2.xml");
serverConfigurationManager.applyConfiguration(sourceFile, destinationFile);//this will restart the server as well
LoginLogoutClient loginLogoutClient = new LoginLogoutClient(dssContext);
sessionCookie = loginLogoutClient.login();
serviceEndPoint = getServiceUrlHttp(serviceName);
}
示例11: serviceDeployment
import org.wso2.carbon.integration.common.utils.LoginLogoutClient; //导入方法依赖的package包/类
@BeforeClass(alwaysRun = true)
public void serviceDeployment() throws Exception {
super.init();
List<File> sqlFileLis = new ArrayList<File>();
sqlFileLis.add(selectSqlFile("CreateEmailUsersTable.sql"));
deployService(serviceName,
createArtifact(getResourceLocation() + File.separator + "samples" + File.separator
+ "dbs" + File.separator + "rdbms" + File.separator
+ serviceName + ".dbs", sqlFileLis));
backendUrl = dssContext.getContextUrls().getBackEndUrl();
/* login to the server as super user and add user with email user name for the test case */
userManagementClient = new UserManagementClient(backendUrl,sessionCookie);
userManagementClient.addRole("sampleRole", new String[]{},new String[]{"admin"});
userManagementClient.addUser("[email protected]","test123",new String[]{"sampleRole"},"emailUserProfile");
serverConfigurationManager = new ServerConfigurationManager(dssContext);
serverConfigurationManager.copyToComponentLib(new File(getResourceLocation()
+ File.separator + "jar" + File.separator
+ "msgContextHandler-1.0.0.jar"));
String carbonHome = System.getProperty("carbon.home");
File sourceFile = new File(getResourceLocation()
+ File.separator + "serverConfigs" + File.separator
+ "axis2.xml");
File destinationFile = new File(carbonHome + File.separator + "repository" + File.separator + "conf" + File.separator + "axis2"+ File.separator + "axis2.xml");
serverConfigurationManager.applyConfiguration(sourceFile, destinationFile);//this will restart the server as well
LoginLogoutClient loginLogoutClient = new LoginLogoutClient(dssContext);
sessionCookie = loginLogoutClient.login();
serviceEndPoint = getServiceUrlHttp(serviceName);
}
示例12: init
import org.wso2.carbon.integration.common.utils.LoginLogoutClient; //导入方法依赖的package包/类
protected void init(TestUserMode userType) throws Exception {
esContext = new AutomationContext("ES", userType);
automationContext = esContext;
LoginLogoutClient loginLogoutClient = new LoginLogoutClient(esContext);
sessionCookie = loginLogoutClient.login();
//return the current tenant as the userType(TestUserMode)
tenantInfo = esContext.getContextTenant();
//return the user information initialized with the system
userInfo = automationContext.getContextTenant().getContextUser();
backendURL = automationContext.getContextUrls().getBackEndUrl();
webAppURL = automationContext.getContextUrls().getWebAppURL();
storeContext = new AutomationContext("ES", "store", userType);
publisherContext = new AutomationContext("ES", "publisher", userType);
}
示例13: init
import org.wso2.carbon.integration.common.utils.LoginLogoutClient; //导入方法依赖的package包/类
protected void init(TestUserMode testUserMode) throws Exception {
storeContext = new AutomationContext("es", "store", testUserMode);
publisherContext = new AutomationContext("es", "publisher", testUserMode);
automationContext = new AutomationContext("es",testUserMode);
loginLogoutClient = new LoginLogoutClient(automationContext);
sessionCookie = loginLogoutClient.login();
backendURL = automationContext.getContextUrls().getBackEndUrl();
webAppURL = automationContext.getContextUrls().getWebAppURL();
userInfo = automationContext.getContextTenant().getContextUser();
}
示例14: loginTest
import org.wso2.carbon.integration.common.utils.LoginLogoutClient; //导入方法依赖的package包/类
@Test(groups = "wso2.es")
public void loginTest() throws Exception{
System.out.println("Call Login test");
esContext = new AutomationContext(
ESIntegrationTestConstants.ES_PRODUCT_NAME, TestUserMode.SUPER_TENANT_ADMIN);
LoginLogoutClient loginLogoutClient = new LoginLogoutClient(esContext);
sessionCookie = loginLogoutClient.login();
Assert.assertTrue(sessionCookie.contains("JSESSIONID="), "JSESSIONID= not found");
}
示例15: init
import org.wso2.carbon.integration.common.utils.LoginLogoutClient; //导入方法依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init()
throws XPathExpressionException, IOException, URISyntaxException, SAXException,
XMLStreamException, LoginAuthenticationExceptionException, AutomationUtilException {
esContext = new AutomationContext(ESIntegrationTestConstants.ES_PRODUCT_NAME,
TestUserMode.SUPER_TENANT_ADMIN);
LoginLogoutClient loginLogoutClient = new LoginLogoutClient(esContext);
sessionCookie = loginLogoutClient.login();
carbonHome = System.getProperty("carbon.home");
esUser = esContext.getContextTenant().getContextUser().getUserName();
esPwd = esContext.getContextTenant().getContextUser().getPassword();
esHost = esContext.getDefaultInstance().getHosts().get("default");
esPort = esContext.getDefaultInstance().getPorts().get("https");
}