當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。