本文整理汇总了Java中org.oscm.types.exceptions.OrganizationRemovedException类的典型用法代码示例。如果您正苦于以下问题:Java OrganizationRemovedException类的具体用法?Java OrganizationRemovedException怎么用?Java OrganizationRemovedException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OrganizationRemovedException类属于org.oscm.types.exceptions包,在下文中一共展示了OrganizationRemovedException类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getUser_ObjectNotFound
import org.oscm.types.exceptions.OrganizationRemovedException; //导入依赖的package包/类
@Test(expected = AuthenticationException.class)
public void getUser_ObjectNotFound() throws ObjectNotFoundException,
OperationNotPermittedException, OrganizationRemovedException,
APPlatformException {
// given
doReturn(idServ).when(besDAO).getBESWebService(
eq(IdentityService.class), any(ServiceInstance.class), any(Optional.class));
doThrow(new ObjectNotFoundException()).when(idServ).getUser(
any(VOUser.class));
// when
besDAO.getUser(new ServiceInstance(), new VOUser(), Optional.empty());
}
示例2: getUser_OperationNotPermitted
import org.oscm.types.exceptions.OrganizationRemovedException; //导入依赖的package包/类
@Test(expected = AuthenticationException.class)
public void getUser_OperationNotPermitted() throws ObjectNotFoundException,
OperationNotPermittedException, OrganizationRemovedException,
APPlatformException {
// given
doReturn(idServ).when(besDAO).getBESWebService(
eq(IdentityService.class), any(ServiceInstance.class), any(Optional.class));
doThrow(new OperationNotPermittedException()).when(idServ).getUser(
any(VOUser.class));
// when
besDAO.getUser(new ServiceInstance(), new VOUser(), Optional.empty());
}
示例3: getUser_OrganizationRemovedException
import org.oscm.types.exceptions.OrganizationRemovedException; //导入依赖的package包/类
@Test(expected = AuthenticationException.class)
public void getUser_OrganizationRemovedException()
throws ObjectNotFoundException, OperationNotPermittedException,
OrganizationRemovedException, APPlatformException {
// given
doReturn(idServ).when(besDAO).getBESWebService(
eq(IdentityService.class), any(ServiceInstance.class), any(Optional.class));
doThrow(new OrganizationRemovedException()).when(idServ).getUser(
any(VOUser.class));
// when
besDAO.getUser(new ServiceInstance(), new VOUser(), Optional.empty());
}
示例4: getUser
import org.oscm.types.exceptions.OrganizationRemovedException; //导入依赖的package包/类
@Test
public void getUser() throws ObjectNotFoundException,
OperationNotPermittedException, OrganizationRemovedException,
APPlatformException {
// given
doReturn(idServ).when(besDAO).getBESWebService(
eq(IdentityService.class), any(ServiceInstance.class), any(Optional.class));
VOUser user = new VOUser();
// when
besDAO.getUser(new ServiceInstance(), user, Optional.empty());
// then
verify(idServ).getUser(user);
}
示例5: getVOUser
import org.oscm.types.exceptions.OrganizationRemovedException; //导入依赖的package包/类
public VOUser getVOUser(String userId) {
VOUser user = VOFactory.createVOUser(userId);
try {
return idServ.getUser(user);
} catch (ObjectNotFoundException | OperationNotPermittedException
| OrganizationRemovedException e) {
System.err.println("Get user information failed, reason: "
+ e.getMessage());
return null;
}
}
示例6: refreshUserValue
import org.oscm.types.exceptions.OrganizationRemovedException; //导入依赖的package包/类
public VOUser refreshUserValue(VOUser user) {
try {
return idServ.getUser(user);
} catch (ObjectNotFoundException | OperationNotPermittedException
| OrganizationRemovedException e) {
System.err.println("Get user information failed, reason: "
+ e.getMessage());
return null;
}
}
示例7: getVOUser
import org.oscm.types.exceptions.OrganizationRemovedException; //导入依赖的package包/类
public VOUser getVOUser(String userId) {
VOUser user = VOFactory2.createVOUser(userId);
try {
return idServ.getUser(user);
} catch (ObjectNotFoundException | OperationNotPermittedException
| OrganizationRemovedException e) {
System.err.println("Get user information failed, reason: "
+ e.getMessage());
return null;
}
}
示例8: getUser_ObjectNotFound
import org.oscm.types.exceptions.OrganizationRemovedException; //导入依赖的package包/类
@Test(expected = AuthenticationException.class)
public void getUser_ObjectNotFound() throws ObjectNotFoundException,
OperationNotPermittedException, OrganizationRemovedException,
APPlatformException {
// given
doReturn(idServ).when(besDAO).getBESWebService(
eq(IdentityService.class), any(ServiceInstance.class));
doThrow(new ObjectNotFoundException()).when(idServ).getUser(
any(VOUser.class));
// when
besDAO.getUser(new ServiceInstance(), new VOUser());
}
示例9: getUser_OperationNotPermitted
import org.oscm.types.exceptions.OrganizationRemovedException; //导入依赖的package包/类
@Test(expected = AuthenticationException.class)
public void getUser_OperationNotPermitted() throws ObjectNotFoundException,
OperationNotPermittedException, OrganizationRemovedException,
APPlatformException {
// given
doReturn(idServ).when(besDAO).getBESWebService(
eq(IdentityService.class), any(ServiceInstance.class));
doThrow(new OperationNotPermittedException()).when(idServ).getUser(
any(VOUser.class));
// when
besDAO.getUser(new ServiceInstance(), new VOUser());
}
示例10: getUser_OrganizationRemovedException
import org.oscm.types.exceptions.OrganizationRemovedException; //导入依赖的package包/类
@Test(expected = AuthenticationException.class)
public void getUser_OrganizationRemovedException()
throws ObjectNotFoundException, OperationNotPermittedException,
OrganizationRemovedException, APPlatformException {
// given
doReturn(idServ).when(besDAO).getBESWebService(
eq(IdentityService.class), any(ServiceInstance.class));
doThrow(new OrganizationRemovedException()).when(idServ).getUser(
any(VOUser.class));
// when
besDAO.getUser(new ServiceInstance(), new VOUser());
}
示例11: getUser
import org.oscm.types.exceptions.OrganizationRemovedException; //导入依赖的package包/类
@Test
public void getUser() throws ObjectNotFoundException,
OperationNotPermittedException, OrganizationRemovedException,
APPlatformException {
// given
doReturn(idServ).when(besDAO).getBESWebService(
eq(IdentityService.class), any(ServiceInstance.class));
VOUser user = new VOUser();
// when
besDAO.getUser(new ServiceInstance(), user);
// then
verify(idServ).getUser(user);
}
示例12: testOrganizationRemovedException
import org.oscm.types.exceptions.OrganizationRemovedException; //导入依赖的package包/类
@Test
public void testOrganizationRemovedException() {
OrganizationRemovedException ex = new OrganizationRemovedException(
"message", PARAMS, new Exception());
checkParams(ex.getMessageParams());
}
示例13: getUser
import org.oscm.types.exceptions.OrganizationRemovedException; //导入依赖的package包/类
/**
* Retrieves the user with the ID specified in the <code>VOUser</code>
* parameter and returns a <code>VOUser</code> object that contains the key
* information and the account status.
* <p>
* Required role: none
*
* @param user
* the value object containing the data required to identify the
* user
* @return the value object with the key information and account status
* @throws ObjectNotFoundException
* if the user is not found
* @throws OperationNotPermittedException
* @throws OrganizationRemovedException
* if the user's organization has been deleted
*/
@WebMethod
public VOUser getUser(@WebParam(name = "user") VOUser user)
throws ObjectNotFoundException, OperationNotPermittedException,
OrganizationRemovedException;
示例14: convertToApi
import org.oscm.types.exceptions.OrganizationRemovedException; //导入依赖的package包/类
/**
* Convert source version Exception to target version Exception
*
* @param oldEx
* Exception to convert.
* @return Exception of target version.
*/
public static OrganizationRemovedException convertToApi(
org.oscm.internal.types.exception.OrganizationRemovedException oldEx) {
return convertExceptionToApi(oldEx, OrganizationRemovedException.class);
}