当前位置: 首页>>代码示例>>Java>>正文


Java ADMValidator.isHttpsScheme方法代码示例

本文整理汇总了Java中org.oscm.validator.ADMValidator.isHttpsScheme方法的典型用法代码示例。如果您正苦于以下问题:Java ADMValidator.isHttpsScheme方法的具体用法?Java ADMValidator.isHttpsScheme怎么用?Java ADMValidator.isHttpsScheme使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.oscm.validator.ADMValidator的用法示例。


在下文中一共展示了ADMValidator.isHttpsScheme方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getSubscriptionUrl

import org.oscm.validator.ADMValidator; //导入方法依赖的package包/类
/**
 * Gets the URL to access the subscription.
 * 
 * @param subscription
 *            the subscription for which we want to know the URL
 * @return the URL to access the subscription
 */
String getSubscriptionUrl(Subscription subscription) {
    StringBuilder url = new StringBuilder();
    String baseUrl = cfgService.getBaseURL();
    String technicalProductBaseUrl = subscription.getProduct()
            .getTechnicalProduct().getBaseURL();

    if (ADMValidator.isHttpsScheme(technicalProductBaseUrl)) {
        baseUrl = cfgService
                .getConfigurationSetting(ConfigurationKey.BASE_URL_HTTPS,
                        Configuration.GLOBAL_CONTEXT)
                .getValue();
    }

    url.append(baseUrl);
    if (url.length() == 0 || url.charAt(url.length() - 1) != '/') {
        url.append('/');
    }
    url.append("opt/");
    url.append(Long.toHexString(subscription.getKey()));
    url.append('/');
    return url.toString();
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:30,代码来源:SubscriptionServiceBean.java

示例2: getAccessUrl

import org.oscm.validator.ADMValidator; //导入方法依赖的package包/类
/**
 * Gets the URL to access a subscribed service.
 *
 * @param subscription
 * @return
 */
protected String getAccessUrl(POSubscription subscription) {
    if (subscription.getServiceAccessType() == ServiceAccessType.USER
            || subscription.getServiceAccessType() == ServiceAccessType.DIRECT) {
        if (subscription.getServiceBaseURL() == null) {
            return "";
        }

        return subscription.getServiceBaseURL();
    } else {
        String serviceBaseUrl = subscription.getServiceBaseURL();
        String serverBaseUrl;
        if (ADMValidator.isHttpsScheme(serviceBaseUrl)) {
            serverBaseUrl = applicationBean.getServerBaseUrlHttps();
        } else {
            serverBaseUrl = applicationBean.getServerBaseUrl();
        }

        return ADMStringUtils.removeEndingSlash(serverBaseUrl)
                + Constants.SERVICE_BASE_URI + "/"
                + subscription.getHexKey() + "/";
    }
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:29,代码来源:MySubscriptionsLazyDataModel.java

示例3: getAccessUrl

import org.oscm.validator.ADMValidator; //导入方法依赖的package包/类
String getAccessUrl(POLandingpageEntry entry) {
    if (entry.getServiceAccessType() == ServiceAccessType.USER
            || entry.getServiceAccessType() == ServiceAccessType.DIRECT) {
        return entry.getServiceAccessURL();
    } else {
        String serviceBaseUrl = entry.getServiceAccessURL();
        String serverBaseUrl;
        if (ADMValidator.isHttpsScheme(serviceBaseUrl)) {
            serverBaseUrl = getApplicationBean().getServerBaseUrlHttps();
        } else {
            serverBaseUrl = getApplicationBean().getServerBaseUrl();
        }

        return ADMStringUtils.removeEndingSlash(serverBaseUrl)
                + Constants.SERVICE_BASE_URI + "/"
                + Long.toHexString(entry.getSubscriptionKey()) + "/";
    }
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:19,代码来源:EnterpriseLandingpageCtrl.java

示例4: getSubscriptionUrl

import org.oscm.validator.ADMValidator; //导入方法依赖的package包/类
/**
 * Gets the URL to access the subscription.
 * 
 * @param subscription
 *            the subscription for which we want to know the URL
 * @return the URL to access the subscription
 */
String getSubscriptionUrl(Subscription subscription) {
    StringBuffer url = new StringBuffer();
    String baseUrl = serviceFacade.getConfigurationService().getBaseURL();
    String technicalProductBaseUrl = subscription.getProduct()
            .getTechnicalProduct().getBaseURL();

    if (ADMValidator.isHttpsScheme(technicalProductBaseUrl)) {
        baseUrl = serviceFacade
                .getConfigurationService()
                .getConfigurationSetting(ConfigurationKey.BASE_URL_HTTPS,
                        Configuration.GLOBAL_CONTEXT).getValue();
    }

    url.append(baseUrl);
    if (url.length() == 0 || url.charAt(url.length() - 1) != '/') {
        url.append('/');
    }
    url.append("opt/");
    url.append(Long.toHexString(subscription.getKey()));
    url.append('/');
    return url.toString();
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:30,代码来源:NotifyProvisioningServiceHandler.java

示例5: redirectToMpUrl

import org.oscm.validator.ADMValidator; //导入方法依赖的package包/类
/**
 * redirectToMp Url
 */
protected boolean redirectToMpUrl(HttpServletRequest httpRequest, HttpServletResponse httpResponse)
        throws IOException {
    String uri = httpRequest.getRequestURI();
    ConfigurationService cs = getConfigurationService(httpRequest);
    if (httpRequest.getRequestURL() == null)
        return false;
    String requestUrl = httpRequest.getRequestURL().toString();
    String queryString = httpRequest.getQueryString() == null ? ""
            : httpRequest.getQueryString();

    String mpRedirect;
    if (ADMValidator.isHttpsScheme(requestUrl)) {
        mpRedirect = getRedirectMpUrlHttps(cs);
    } else {
        mpRedirect = getRedirectMpUrlHttp(cs);
    }
    if (uri != null && !ADMStringUtils.isBlank(mpRedirect)) {
        String suffix = mpRedirect.contains("?") ? mpRedirect
                .substring(mpRedirect.lastIndexOf('?') + 1) : "";
        if (!mpRedirect.contains(uri.replaceFirst("/index.jsf", ""))
                || !suffix.equals(queryString)) {
            JSFUtils.sendRedirect(httpResponse, mpRedirect);
            return true;
        }
    }
    return false;
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:31,代码来源:BaseBesFilter.java


注:本文中的org.oscm.validator.ADMValidator.isHttpsScheme方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。