本文整理汇总了Java中org.oscm.provisioning.data.InstanceInfo.setBaseUrl方法的典型用法代码示例。如果您正苦于以下问题:Java InstanceInfo.setBaseUrl方法的具体用法?Java InstanceInfo.setBaseUrl怎么用?Java InstanceInfo.setBaseUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.oscm.provisioning.data.InstanceInfo
的用法示例。
在下文中一共展示了InstanceInfo.setBaseUrl方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createInstance
import org.oscm.provisioning.data.InstanceInfo; //导入方法依赖的package包/类
@Override
public InstanceResult createInstance(InstanceRequest request,
User requestingUser) {
checkThrowError();
InstanceResult result = new InstanceResult();
if (request.getOrganizationId() != null) {
if (returnedInstanceInfo == null) {
InstanceInfo info = new InstanceInfo();
info.setAccessInfo(request.getDefaultLocale());
info.setBaseUrl(ApplicationServiceBeanTest.BASE_URL);
info.setInstanceId(request.getOrganizationId()
+ request.getSubscriptionId());
info.setLoginPath(request.getLoginUrl());
result.setInstance(info);
} else {
result.setInstance(returnedInstanceInfo);
}
}
setParameters(request.getParameterValue());
this.requestingUser = requestingUser;
return setRcAndDesc(result);
}
示例2: createInstanceResult
import org.oscm.provisioning.data.InstanceInfo; //导入方法依赖的package包/类
/**
* Creates an <code>InstanceResult</code> with given access information.
*
* @param status
* the instance status to take access information from
* @return the instance result object
*/
private InstanceResult createInstanceResult(InstanceStatus status) {
InstanceResult instanceResult = new InstanceResult();
InstanceInfo instanceInfo = new InstanceInfo();
instanceInfo.setAccessInfo(status.getAccessInfo());
instanceInfo.setBaseUrl(status.getBaseUrl());
instanceInfo.setLoginPath(status.getLoginPath());
instanceResult.setRc(0);
instanceResult.setInstance(instanceInfo);
return instanceResult;
}
示例3: createInstanceResult
import org.oscm.provisioning.data.InstanceInfo; //导入方法依赖的package包/类
private InstanceResult createInstanceResult(ServiceInstance currentSI) {
InstanceInfo instance = new InstanceInfo();
instance.setInstanceId(currentSI.getSubscriptionId());
instance.setAccessInfo(currentSI.getServiceAccessInfo());
instance.setBaseUrl(currentSI.getServiceBaseURL());
instance.setLoginPath(currentSI.getServiceLoginPath());
InstanceResult instanceResult = new InstanceResult();
instanceResult.setInstance(instance);
return instanceResult;
}
示例4: getInstanceResult
import org.oscm.provisioning.data.InstanceInfo; //导入方法依赖的package包/类
private InstanceResult getInstanceResult(int returnCode) {
InstanceResult instanceResult = new InstanceResult();
InstanceInfo instanceInfo = new InstanceInfo();
instanceInfo.setAccessInfo("TSReturnAccessInfo");
instanceInfo.setBaseUrl(TS_RETURN_BASE_URL);
instanceInfo.setInstanceId("TSReturnInstanceId");
instanceInfo.setLoginPath("TSReturnLoginPath");
instanceResult.setInstance(instanceInfo);
instanceResult.setRc(returnCode);
return instanceResult;
}
示例5: givenInstanceResult
import org.oscm.provisioning.data.InstanceInfo; //导入方法依赖的package包/类
private InstanceResult givenInstanceResult(int returnCode) {
InstanceResult instanceResult = new InstanceResult();
InstanceInfo instanceInfo = new InstanceInfo();
instanceInfo.setAccessInfo("TSReturnAccessInfo");
instanceInfo.setBaseUrl("TS_RETURN_BASE_URL");
instanceInfo.setInstanceId("TSReturnInstanceId");
instanceInfo.setLoginPath("TSReturnLoginPath");
instanceResult.setInstance(instanceInfo);
instanceResult.setRc(returnCode);
return instanceResult;
}
示例6: validateInstanceInfo_NoBaseUrl
import org.oscm.provisioning.data.InstanceInfo; //导入方法依赖的package包/类
private void validateInstanceInfo_NoBaseUrl(ServiceAccessType accessType)
throws Throwable {
ApplicationServiceBean bean = mockForInstanceInfoValidation(accessType);
InstanceInfo info = createInstanceInfo();
info.setBaseUrl(null);
try {
bean.validateInstanceInfo(info, subscription);
fail();
} catch (TechnicalServiceOperationException e) {
ValidationException ve = (ValidationException) e.getCause();
assertEquals("baseUrl", ve.getMember());
assertEquals(ReasonEnum.URL, ve.getReason());
}
}
示例7: validateInstanceInfo_NoBaseUrl_USER
import org.oscm.provisioning.data.InstanceInfo; //导入方法依赖的package包/类
@Test
public void validateInstanceInfo_NoBaseUrl_USER() throws Throwable {
ApplicationServiceBean bean = mockForInstanceInfoValidation(
ServiceAccessType.USER);
InstanceInfo info = createInstanceInfo();
info.setBaseUrl(null);
bean.validateInstanceInfo(info, subscription);
}
示例8: validateInstanceInfo_NoBaseUrl_DIRECT
import org.oscm.provisioning.data.InstanceInfo; //导入方法依赖的package包/类
@Test
public void validateInstanceInfo_NoBaseUrl_DIRECT() throws Throwable {
ApplicationServiceBean bean = mockForInstanceInfoValidation(
ServiceAccessType.DIRECT);
InstanceInfo info = createInstanceInfo();
info.setBaseUrl(null);
bean.validateInstanceInfo(info, subscription);
}
示例9: createInstanceInfo
import org.oscm.provisioning.data.InstanceInfo; //导入方法依赖的package包/类
private InstanceInfo createInstanceInfo() {
InstanceInfo info = new InstanceInfo();
info.setInstanceId("abc");
info.setBaseUrl("http://localhost:8080");
info.setLoginPath("/login");
info.setAccessInfo("Some access info");
return info;
}