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


Java ObjectNotFoundException类代码示例

本文整理汇总了Java中org.oscm.types.exceptions.ObjectNotFoundException的典型用法代码示例。如果您正苦于以下问题:Java ObjectNotFoundException类的具体用法?Java ObjectNotFoundException怎么用?Java ObjectNotFoundException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: handleBESNotificationException

import org.oscm.types.exceptions.ObjectNotFoundException; //导入依赖的package包/类
void handleBESNotificationException(ServiceInstance currentSI,
        final ProvisioningStatus instanceProvStatus,
        HashMap<String, Setting> changedParameters,
        BESNotificationException bne) {
    // write the parameters back
    updateParameterMapSafe(currentSI, changedParameters);
    if (bne.getCause() instanceof ObjectNotFoundException) {
        logger.info("Subscription with id " + currentSI.getSubscriptionId()
                + " for service instance " + currentSI.getInstanceId()
                + " already terminated.");
        currentSI.markForDeletion();
    }
    // suspend process and inform APP admin with mail

    if (besDAO.isCausedByConnectionException(bne)) {
        suspendApp(currentSI, "mail_bes_notification_error_app_admin");

    } else {
        suspendServiceInstance(currentSI, bne.getCause(),
                instanceProvStatus.getBesNotificationErrorMailMessage(),
                true, true);
    }

}
 
开发者ID:servicecatalog,项目名称:oscm-app,代码行数:25,代码来源:APPTimerServiceBean.java

示例2: notifyAsyncSubscription_completion

import org.oscm.types.exceptions.ObjectNotFoundException; //导入依赖的package包/类
@Test
public void notifyAsyncSubscription_completion()
        throws APPlatformException, BESNotificationException,
        ObjectNotFoundException, SubscriptionStateException,
        TechnicalServiceNotAliveException,
        TechnicalServiceOperationException,
        OrganizationAuthoritiesException, OperationNotPermittedException,
        ValidationException {
    // given
    doReturn(subServ).when(besDAO).getBESWebService(
            eq(SubscriptionService.class), any(ServiceInstance.class), any(Optional.class));
    VOInstanceInfo info = new VOInstanceInfo();
    doReturn(info).when(besDAO).getInstanceInfo(any(ServiceInstance.class),
            any(InstanceResult.class));
    ServiceInstance si = givenServiceInstance(false);

    // when
    besDAO.notifyAsyncSubscription(si, new InstanceResult(), true,
            new APPlatformException(""));

    // then
    verify(subServ).completeAsyncSubscription(si.getSubscriptionId(),
            si.getOrganizationId(), info);
}
 
开发者ID:servicecatalog,项目名称:oscm-app,代码行数:25,代码来源:BesDAOTest.java

示例3: notifyAsyncUpgradeSubscription_completion

import org.oscm.types.exceptions.ObjectNotFoundException; //导入依赖的package包/类
@Test
public void notifyAsyncUpgradeSubscription_completion()
        throws APPlatformException, BESNotificationException,
        ObjectNotFoundException, SubscriptionStateException,
        TechnicalServiceNotAliveException,
        TechnicalServiceOperationException,
        OrganizationAuthoritiesException, OperationNotPermittedException {
    // given
    doReturn(subServ).when(besDAO).getBESWebService(
            eq(SubscriptionService.class), any(ServiceInstance.class), any(Optional.class));
    VOInstanceInfo info = new VOInstanceInfo();
    doReturn(info).when(besDAO).getInstanceInfo(any(ServiceInstance.class),
            any(InstanceResult.class));
    ServiceInstance si = givenServiceInstance(false);

    // when
    besDAO.notifyAsyncUpgradeSubscription(si, new InstanceResult(), true,
            new APPlatformException(""));

    // then
    verify(subServ).completeAsyncUpgradeSubscription(
            si.getSubscriptionId(), si.getOrganizationId(), info);
}
 
开发者ID:servicecatalog,项目名称:oscm-app,代码行数:24,代码来源:BesDAOTest.java

示例4: abortAsynUpgradeSubscription

import org.oscm.types.exceptions.ObjectNotFoundException; //导入依赖的package包/类
@Test(expected = ObjectNotFoundException.class)
public void abortAsynUpgradeSubscription() throws Exception {
    // given
    createdSubscription = createSubscription();
    instance = new VOInstanceInfo();
    instance.setAccessInfo("PLATFORM");
    instance.setBaseUrl(baseUrl);
    instance.setInstanceId(createdSubscription.getSubscriptionId());
    instance.setLoginPath("/login");

    // when
    try {
        subscrServiceForSupplier.abortAsyncUpgradeSubscription(
                createdSubscription.getSubscriptionId(),
                supplier.getOrganizationId(), null);
    } catch (ObjectNotFoundException ex) {
        validateException(createdSubscription.getSubscriptionId(), ex);
        throw ex;
    }
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:21,代码来源:SubscriptionServiceWSTest.java

示例5: notifyAsyncSubscription_abortion_OperationNotPermited

import org.oscm.types.exceptions.ObjectNotFoundException; //导入依赖的package包/类
@Test(expected = BESNotificationException.class)
public void notifyAsyncSubscription_abortion_OperationNotPermited()
        throws APPlatformException, BESNotificationException,
        ObjectNotFoundException, SubscriptionStateException,
        OrganizationAuthoritiesException, OperationNotPermittedException {
    // given
    doReturn(subServ).when(besDAO).getBESWebService(
            eq(SubscriptionService.class), any(ServiceInstance.class), any(Optional.class));
    doReturn(new VOInstanceInfo()).when(besDAO).getInstanceInfo(
            any(ServiceInstance.class), any(InstanceResult.class));
    ServiceInstance si = givenServiceInstance(false);
    doThrow(new OperationNotPermittedException()).when(subServ)
            .abortAsyncSubscription(anyString(), anyString(),
                    anyListOf(VOLocalizedText.class));

    // when
    besDAO.notifyAsyncSubscription(si, new InstanceResult(), false,
            new APPlatformException(""));
}
 
开发者ID:servicecatalog,项目名称:oscm-app,代码行数:20,代码来源:BesDAOTest.java

示例6: notifyAsyncModifySubscription_abortion_OperationNotPermited

import org.oscm.types.exceptions.ObjectNotFoundException; //导入依赖的package包/类
@Test(expected = BESNotificationException.class)
public void notifyAsyncModifySubscription_abortion_OperationNotPermited()
        throws APPlatformException, BESNotificationException,
        ObjectNotFoundException, SubscriptionStateException,
        OrganizationAuthoritiesException, OperationNotPermittedException {
    // given
    doReturn(subServ).when(besDAO).getBESWebService(
            eq(SubscriptionService.class), any(ServiceInstance.class), any(Optional.class));
    doReturn(new VOInstanceInfo()).when(besDAO).getInstanceInfo(
            any(ServiceInstance.class), any(InstanceResult.class));
    ServiceInstance si = givenServiceInstance(false);
    doThrow(new OperationNotPermittedException()).when(subServ)
            .abortAsyncModifySubscription(anyString(), anyString(),
                    anyListOf(VOLocalizedText.class));

    // when
    besDAO.notifyAsyncModifySubscription(si, new InstanceResult(), false,
            new APPlatformException(""));
}
 
开发者ID:servicecatalog,项目名称:oscm-app,代码行数:20,代码来源:BesDAOTest.java

示例7: notifyAsyncModifySubscription_completion_ObjectNotFound

import org.oscm.types.exceptions.ObjectNotFoundException; //导入依赖的package包/类
@Test
public void notifyAsyncModifySubscription_completion_ObjectNotFound()
        throws APPlatformException, BESNotificationException,
        ObjectNotFoundException, SubscriptionStateException,
        TechnicalServiceNotAliveException,
        TechnicalServiceOperationException,
        OrganizationAuthoritiesException, OperationNotPermittedException {
    // given
    doReturn(subServ).when(besDAO).getBESWebService(
            eq(SubscriptionService.class), any(ServiceInstance.class), any(Optional.class));
    doReturn(new VOInstanceInfo()).when(besDAO).getInstanceInfo(
            any(ServiceInstance.class), any(InstanceResult.class));
    ServiceInstance si = givenServiceInstance(false);
    doThrow(new ObjectNotFoundException()).when(subServ)
            .completeAsyncModifySubscription(anyString(), anyString(),
                    any(VOInstanceInfo.class));

    // when
    besDAO.notifyAsyncModifySubscription(si, new InstanceResult(), true,
            new APPlatformException(""));

    // then no exception
}
 
开发者ID:servicecatalog,项目名称:oscm-app,代码行数:24,代码来源:BesDAOTest.java

示例8: testGetUserNoOrgSet

import org.oscm.types.exceptions.ObjectNotFoundException; //导入依赖的package包/类
@Test(expected = ObjectNotFoundException.class)
public void testGetUserNoOrgSet() throws Exception {

    // given
    VOTenant tenant = createTenantWithSettings("tenant1000");

    WebserviceTestBase.createOrganization(USER_ID_FOR_TENANT,
            "tenant1000org", tenant.getKey(),
            OrganizationRoleType.SUPPLIER);

    IdentityService identityService = ServiceFactory
            .getSTSServiceFactory("tenant1000", null)
            .getIdentityService(USER_ID_FOR_TENANT, "secret");

    // when
    identityService.getUser(prepareUser(USER_ID_FOR_TENANT));

    // then
    // ObjectNotFoundException expected
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:21,代码来源:TenantRelatedSampleWSTest.java

示例9: notifyAsyncSubscription_abortion_SubscriptionState

import org.oscm.types.exceptions.ObjectNotFoundException; //导入依赖的package包/类
@Test
public void notifyAsyncSubscription_abortion_SubscriptionState()
        throws APPlatformException, BESNotificationException,
        ObjectNotFoundException, SubscriptionStateException,
        OrganizationAuthoritiesException, OperationNotPermittedException {
    // given
    doReturn(subServ).when(besDAO).getBESWebService(
            eq(SubscriptionService.class), any(ServiceInstance.class), any(Optional.class));
    doReturn(new VOInstanceInfo()).when(besDAO).getInstanceInfo(
            any(ServiceInstance.class), any(InstanceResult.class));
    ServiceInstance si = givenServiceInstance(false);
    doThrow(new SubscriptionStateException()).when(subServ)
            .abortAsyncSubscription(anyString(), anyString(),
                    anyListOf(VOLocalizedText.class));
    doNothing().when(besDAO).handleSubscriptionStateException(
            any(ServiceInstance.class), any(InstanceResult.class),
            eq(false), any(SubscriptionStateException.class));

    // when
    besDAO.notifyAsyncSubscription(si, new InstanceResult(), false,
            new APPlatformException(""));

    // then no exception
}
 
开发者ID:servicecatalog,项目名称:oscm-app,代码行数:25,代码来源:BesDAOTest.java

示例10: notifyAsyncModifySubscription_completion_SubscriptionState

import org.oscm.types.exceptions.ObjectNotFoundException; //导入依赖的package包/类
@Test
public void notifyAsyncModifySubscription_completion_SubscriptionState()
        throws APPlatformException, BESNotificationException,
        ObjectNotFoundException, SubscriptionStateException,
        TechnicalServiceNotAliveException,
        TechnicalServiceOperationException,
        OrganizationAuthoritiesException, OperationNotPermittedException {
    // given
    doReturn(subServ).when(besDAO).getBESWebService(
            eq(SubscriptionService.class), any(ServiceInstance.class), any(Optional.class));
    doReturn(new VOInstanceInfo()).when(besDAO).getInstanceInfo(
            any(ServiceInstance.class), any(InstanceResult.class));
    ServiceInstance si = givenServiceInstance(false);
    doThrow(new SubscriptionStateException()).when(subServ)
            .completeAsyncModifySubscription(anyString(), anyString(),
                    any(VOInstanceInfo.class));
    doNothing().when(besDAO).handleSubscriptionStateException(
            any(ServiceInstance.class), any(InstanceResult.class),
            eq(true), any(SubscriptionStateException.class));

    // when
    besDAO.notifyAsyncModifySubscription(si, new InstanceResult(), true,
            new APPlatformException(""));

    // then no exception
}
 
开发者ID:servicecatalog,项目名称:oscm-app,代码行数:27,代码来源:BesDAOTest.java

示例11: notifyAsyncUpgradeSubscription_completion_SubscriptionState

import org.oscm.types.exceptions.ObjectNotFoundException; //导入依赖的package包/类
@Test
public void notifyAsyncUpgradeSubscription_completion_SubscriptionState()
        throws APPlatformException, BESNotificationException,
        ObjectNotFoundException, SubscriptionStateException,
        TechnicalServiceNotAliveException,
        TechnicalServiceOperationException,
        OrganizationAuthoritiesException, OperationNotPermittedException {
    // given
    doReturn(subServ).when(besDAO).getBESWebService(
            eq(SubscriptionService.class), any(ServiceInstance.class), any(Optional.class));
    doReturn(new VOInstanceInfo()).when(besDAO).getInstanceInfo(
            any(ServiceInstance.class), any(InstanceResult.class));
    ServiceInstance si = givenServiceInstance(false);
    doThrow(new SubscriptionStateException()).when(subServ)
            .completeAsyncUpgradeSubscription(anyString(), anyString(),
                    any(VOInstanceInfo.class));
    doNothing().when(besDAO).handleSubscriptionStateException(
            any(ServiceInstance.class), any(InstanceResult.class),
            eq(true), any(SubscriptionStateException.class));

    // when
    besDAO.notifyAsyncUpgradeSubscription(si, new InstanceResult(), true,
            new APPlatformException(""));

    // then no exception
}
 
开发者ID:servicecatalog,项目名称:oscm-app,代码行数:27,代码来源:BesDAOTest.java

示例12: notifyAsyncSubscription_abortion

import org.oscm.types.exceptions.ObjectNotFoundException; //导入依赖的package包/类
@Test
public void notifyAsyncSubscription_abortion() throws APPlatformException,
        BESNotificationException, ObjectNotFoundException,
        SubscriptionStateException, OrganizationAuthoritiesException,
        OperationNotPermittedException {
    // given
    doReturn(subServ).when(besDAO).getBESWebService(
            eq(SubscriptionService.class), any(ServiceInstance.class), any(Optional.class));
    VOInstanceInfo info = new VOInstanceInfo();
    doReturn(info).when(besDAO).getInstanceInfo(any(ServiceInstance.class),
            any(InstanceResult.class));
    List<VOLocalizedText> besText = new ArrayList<>();
    besText.add(new VOLocalizedText("de", "text"));
    doReturn(besText).when(besDAO).toBES(anyListOf(LocalizedText.class));
    ServiceInstance si = givenServiceInstance(false);
    APPlatformException cause = new APPlatformException("");

    // when
    besDAO.notifyAsyncSubscription(si, new InstanceResult(), false, cause);

    // then
    verify(subServ).abortAsyncSubscription(eq(si.getSubscriptionId()),
            eq(si.getOrganizationId()), eq(besText));
}
 
开发者ID:servicecatalog,项目名称:oscm-app,代码行数:25,代码来源:BesDAOTest.java

示例13: notifyAsyncModifySubscription_abortion

import org.oscm.types.exceptions.ObjectNotFoundException; //导入依赖的package包/类
@Test
public void notifyAsyncModifySubscription_abortion()
        throws APPlatformException, BESNotificationException,
        ObjectNotFoundException, SubscriptionStateException,
        OrganizationAuthoritiesException, OperationNotPermittedException {
    // given
    doReturn(subServ).when(besDAO).getBESWebService(
            eq(SubscriptionService.class), any(ServiceInstance.class), any(Optional.class));
    VOInstanceInfo info = new VOInstanceInfo();
    doReturn(info).when(besDAO).getInstanceInfo(any(ServiceInstance.class),
            any(InstanceResult.class));
    List<VOLocalizedText> besText = new ArrayList<>();
    besText.add(new VOLocalizedText("de", "text"));
    doReturn(besText).when(besDAO).toBES(anyListOf(LocalizedText.class));
    ServiceInstance si = givenServiceInstance(false);
    APPlatformException cause = new APPlatformException("");

    // when
    besDAO.notifyAsyncModifySubscription(si, new InstanceResult(), false,
            cause);

    // then
    verify(subServ).abortAsyncModifySubscription(
            eq(si.getSubscriptionId()), eq(si.getOrganizationId()),
            eq(besText));
}
 
开发者ID:servicecatalog,项目名称:oscm-app,代码行数:27,代码来源:BesDAOTest.java

示例14: grantUserRoles

import org.oscm.types.exceptions.ObjectNotFoundException; //导入依赖的package包/类
@Test
@Order(order = 5)
public void grantUserRoles() throws ObjectNotFoundException,
        NonUniqueBusinessKeyException, MailOperationException,
        OperationNotPermittedException {

    // given
    identityService.addRevokeUserUnitAssignment(userGroup.getName(),
            Collections.<VOUser>singletonList(USER),
            Collections.<VOUser>emptyList());

    // when and then
    VOOrganizationalUnit unit = getUnitWithName(userGroup.getName());

    Assert.assertNotNull(unit);
    unitService.revokeUserRoles(USER,
            Collections.singletonList(UnitRoleType.USER), unit);
    unitService.grantUserRoles(USER,
            Collections.singletonList(UnitRoleType.ADMINISTRATOR), unit);
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:21,代码来源:OrganizationalUnitServiceWSTest.java

示例15: notifyOnProvisioningStatusUpdate_info

import org.oscm.types.exceptions.ObjectNotFoundException; //导入依赖的package包/类
@Test
public void notifyOnProvisioningStatusUpdate_info()
        throws BESNotificationException, ObjectNotFoundException,
        SubscriptionStateException, OrganizationAuthoritiesException,
        OperationNotPermittedException {
    // given
    List<LocalizedText> list = new ArrayList<>();
    list.add(new LocalizedText("de", "text"));
    doNothing().when(subServ).updateAsyncSubscriptionProgress(anyString(),
            anyString(), anyListOf(VOLocalizedText.class));

    // when
    besDAO.notifyOnProvisioningStatusUpdate(givenServiceInstance(false),
            list);

    // then
    verify(subServ).updateAsyncSubscriptionProgress(eq("subId"),
            eq("orgId"), anyListOf(VOLocalizedText.class));
}
 
开发者ID:servicecatalog,项目名称:oscm-app,代码行数:20,代码来源:BesDAOTest.java


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