本文整理汇总了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();
}
示例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() + "/";
}
}
示例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()) + "/";
}
}
示例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();
}
示例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;
}