org.wso2.carbon.automation.engine.configurations.UrlGenerationUtil Java Examples

The following examples show how to use org.wso2.carbon.automation.engine.configurations.UrlGenerationUtil. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RegistryProviderUtil.java    From product-es with Apache License 2.0 6 votes vote down vote up
public RemoteRegistry getRemoteRegistry (AutomationContext automationContext) throws Exception {

        RemoteRegistry registry = null;
        TestFrameworkUtils.setKeyStoreProperties(automationContext);
        System.setProperty("carbon.repo.write.mode", "true");
        try {
            registry = new RemoteRegistry(new URL(
                    UrlGenerationUtil.getRemoteRegistryURL(automationContext.getDefaultInstance())),
                    automationContext.getContextTenant().getContextUser().getUserName(),
                    automationContext.getContextTenant().getContextUser().getPassword());

        } catch (Exception e) {
            handleException("Failed to initialized remote registry instance ", e);
        }
        return registry;
    }
 
Example #2
Source File: ESBIntegrationTest.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
protected void init() throws Exception {
    axis2Client = new StockQuoteClient();
    context = new AutomationContext();
    contextUrls = context.getContextUrls();
    esbUtils = new ESBTestCaseUtils();
    hostName = UrlGenerationUtil.getManagerHost(context.getInstance());
    portOffset = Integer.parseInt(System.getProperty("port.offset"));
    isManagementApiAvailable = false;
}
 
Example #3
Source File: CEPIntegrationTest.java    From product-cep with Apache License 2.0 5 votes vote down vote up
/**
 * This method returns the baseUrl of webApp
 *
 * @return baseUrl - the baseUrl of webApp
 */
public String getBaseUrl() throws Exception {
    if (baseUrl == null) {
        baseUrl = UrlGenerationUtil.getWebAppURL(getDsContext().getContextTenant(), getDsContext().getInstance());
    }
    return baseUrl;
}
 
Example #4
Source File: ESBIntegrationUITest.java    From micro-integrator with Apache License 2.0 4 votes vote down vote up
protected String getLoginURL() throws XPathExpressionException {
    return UrlGenerationUtil.getLoginURL(context.getInstance());
}
 
Example #5
Source File: BPSIntegrationUiBaseTest.java    From product-ei with Apache License 2.0 4 votes vote down vote up
protected String getLoginURL() throws Exception{
    return UrlGenerationUtil.getLoginURL(ssServer.getInstance());
}
 
Example #6
Source File: ESBIntegrationUITest.java    From product-ei with Apache License 2.0 4 votes vote down vote up
protected String getLoginURL() throws XPathExpressionException {
    return UrlGenerationUtil.getLoginURL(context.getInstance());
}
 
Example #7
Source File: CEPIntegrationUITest.java    From product-cep with Apache License 2.0 4 votes vote down vote up
protected String getLoginURL() throws XPathExpressionException {
    return UrlGenerationUtil.getLoginURL(cepServer.getInstance());
}
 
Example #8
Source File: CEPIntegrationTest.java    From product-cep with Apache License 2.0 4 votes vote down vote up
protected String getLoginURL() throws XPathExpressionException {
    return UrlGenerationUtil.getLoginURL(cepServer.getInstance());
}
 
Example #9
Source File: ESIntegrationUIBaseTest.java    From product-es with Apache License 2.0 4 votes vote down vote up
protected String getLoginURL() throws XPathExpressionException {
    return UrlGenerationUtil.getLoginURL(automationContext.getInstance());
}
 
Example #10
Source File: ESIntegrationUITest.java    From product-es with Apache License 2.0 4 votes vote down vote up
protected String getLoginURL() throws XPathExpressionException {
    return UrlGenerationUtil.getLoginURL(esContext.getInstance());
}
 
Example #11
Source File: ESIntegrationUITest.java    From product-es with Apache License 2.0 4 votes vote down vote up
protected String getWebAppURL() throws XPathExpressionException {
    return  UrlGenerationUtil.getWebAppURL(esContext.getContextTenant(), esContext.getInstance());
}
 
Example #12
Source File: ESIntegrationUITest.java    From product-es with Apache License 2.0 4 votes vote down vote up
protected String getWebAppURLHttps() throws XPathExpressionException {
    return  UrlGenerationUtil.getWebAppURLHttps(esContext.getContextTenant(), esContext
            .getInstance());
}
 
Example #13
Source File: ESIntegrationUITest.java    From product-es with Apache License 2.0 4 votes vote down vote up
protected String getStorePublisherUrl() throws XPathExpressionException {
    return UrlGenerationUtil.getWebAppURL(esContext.getContextTenant(), esContext.getInstance()).split("\\/t\\/")
            [0];
}