本文整理汇总了Java中org.oscm.provisioning.intf.ProvisioningService.deleteUsers方法的典型用法代码示例。如果您正苦于以下问题:Java ProvisioningService.deleteUsers方法的具体用法?Java ProvisioningService.deleteUsers怎么用?Java ProvisioningService.deleteUsers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.oscm.provisioning.intf.ProvisioningService
的用法示例。
在下文中一共展示了ProvisioningService.deleteUsers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deleteUsers
import org.oscm.provisioning.intf.ProvisioningService; //导入方法依赖的package包/类
@Override
public BaseResult deleteUsers(String instanceId, List<User> users,
User requestingUser) {
logger.info("Delete users for instance {}.", instanceId);
ServiceInstance instance = null;
try {
instance = instanceDAO.getInstanceById(instanceId);
checkInstanceAvailability(instance);
final APPlatformController controller = APPlatformControllerFactory
.getInstance(instance.getControllerId());
final ProvisioningSettings settings = configService
.getProvisioningSettings(instance,
UserMapper.toServiceUser(requestingUser));
// Forward activation request
final InstanceStatus status = controller.deleteUsers(
instance.getInstanceId(), settings,
mapToServiceUsers(users));
if (status != null) {
// forward call to provisioning service on application instance
if (status.isInstanceProvisioningRequested()) {
final ProvisioningService provisioning = provisioningFactory
.getInstance(instance);
final BaseResult result = provisioning
.deleteUsers(instanceId, users, requestingUser);
if (provResult.isError(result)) {
return result;
}
}
// If everything worked well we will save all changed parameters
instance.setInstanceParameters(status.getChangedParameters());
}
instance.setProvisioningStatus(
ProvisioningStatus.WAITING_FOR_USER_DELETION);
em.persist(instance);
timerService.initTimers();
return provResult.newOkBaseResult();
} catch (Exception e) {
logger.warn(e.getMessage(), e);
return provResult.getErrorResult(BaseResult.class, e,
getLocale(requestingUser), instance, instanceId);
}
}