test_class.file: api/src/test/java/com/abiquo/api/services/cloud/VirtualDatacenterServiceTest.java
test_class.identifier: VirtualDatacenterServiceTest
test_class.superclass: extends AbstractUnitTest
test_case.body: @Test
      public void findVirtualDatacenterAssignedToUser()
      {
          Enterprise enterprise = enterpriseGenerator.createUniqueInstance();
          Datacenter datacenter = datacenterGenerator.createUniqueInstance();
  
          Role role = roleGenerator.createInstance();
          User user = userGenerator.createInstance(enterprise, role);
  
          VirtualDatacenter vdc1 = vdcGenerator.createInstance(datacenter, enterprise);
          VirtualDatacenter vdc2 = vdcGenerator.createInstance(datacenter, enterprise);
          VirtualDatacenter vdc3 = vdcGenerator.createInstance(datacenter, enterprise);
  
          setup(enterprise, datacenter, vdc1, vdc2, vdc3);
          String ids = vdc1.getId() + "," + vdc2.getId();
  
          user.setAvailableVirtualDatacenters(ids);
          setup(user.getRole(), user);
  
          VirtualDatacenterService service =
              new VirtualDatacenterService(getEntityManagerWithAnActiveTransaction());
  
          Collection<VirtualDatacenter> vdcs =
              service.getVirtualDatacenters(enterprise, null, null, null);
          Assert.assertSize(vdcs, 3);
  
          vdcs = service.getVirtualDatacenters(enterprise, null, user, null);
          Assert.assertSize(vdcs, 2);
      }
test_case.class_method_signature: VirtualDatacenterServiceTest.findVirtualDatacenterAssignedToUser()
test_case.full_signature: @Test public void findVirtualDatacenterAssignedToUser()
test_case.identifier: findVirtualDatacenterAssignedToUser
test_case.invocations: createUniqueInstance createUniqueInstance createInstance createInstance createInstance createInstance createInstance setup getId getId setAvailableVirtualDatacenters setup getRole getEntityManagerWithAnActiveTransaction getVirtualDatacenters assertSize getVirtualDatacenters assertSize
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void findVirtualDatacenterAssignedToUser()
focal_class.declarator: FENCE_MODE = "bridge"
focal_class.modifier: public static final
focal_class.original_string: public static final String FENCE_MODE = "bridge";
focal_class.type: String
focal_class.var_name: FENCE_MODE
focal_class.declarator: userService
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired
      UserService userService;
focal_class.type: UserService
focal_class.var_name: userService
focal_class.declarator: datacenterRepo
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired
      InfrastructureRep datacenterRepo;
focal_class.type: InfrastructureRep
focal_class.var_name: datacenterRepo
focal_class.declarator: repo
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired
      VirtualDatacenterRep repo;
focal_class.type: VirtualDatacenterRep
focal_class.var_name: repo
focal_class.declarator: datacenterLimitsDao
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired
      DatacenterLimitsDAO datacenterLimitsDao;
focal_class.type: DatacenterLimitsDAO
focal_class.var_name: datacenterLimitsDao
focal_class.declarator: networkService
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired
      NetworkService networkService;
focal_class.type: NetworkService
focal_class.var_name: networkService
focal_class.declarator: securityService
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired
      SecurityService securityService;
focal_class.type: SecurityService
focal_class.var_name: securityService
focal_class.file: api/src/main/java/com/abiquo/api/services/cloud/VirtualDatacenterService.java
focal_class.identifier: VirtualDatacenterService
focal_class.class_method_signature: VirtualDatacenterService.VirtualDatacenterService()
focal_class.full_signature: public  VirtualDatacenterService()
focal_class.identifier: VirtualDatacenterService
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  VirtualDatacenterService()
focal_class.class_method_signature: VirtualDatacenterService.VirtualDatacenterService(final EntityManager em)
focal_class.full_signature: public  VirtualDatacenterService(final EntityManager em)
focal_class.identifier: VirtualDatacenterService
focal_class.modifiers: public
focal_class.parameters: (final EntityManager em)
focal_class.signature:  VirtualDatacenterService(final EntityManager em)
focal_class.class_method_signature: VirtualDatacenterService.getVirtualDatacenters(final Enterprise enterprise,
          final Datacenter datacenter, final FilterOptions filterOptions)
focal_class.full_signature: public Collection<VirtualDatacenter> getVirtualDatacenters(final Enterprise enterprise,
          final Datacenter datacenter, final FilterOptions filterOptions)
focal_class.identifier: getVirtualDatacenters
focal_class.modifiers: public
focal_class.parameters: (final Enterprise enterprise,
          final Datacenter datacenter, final FilterOptions filterOptions)
focal_class.return: Collection<VirtualDatacenter>
focal_class.signature: Collection<VirtualDatacenter> getVirtualDatacenters(final Enterprise enterprise,
          final Datacenter datacenter, final FilterOptions filterOptions)
focal_class.class_method_signature: VirtualDatacenterService.getVirtualDatacenters(Enterprise enterprise,
          final Datacenter datacenter, final User user, final FilterOptions filterOptions)
focal_class.full_signature: public Collection<VirtualDatacenter> getVirtualDatacenters(Enterprise enterprise,
          final Datacenter datacenter, final User user, final FilterOptions filterOptions)
focal_class.identifier: getVirtualDatacenters
focal_class.modifiers: public
focal_class.parameters: (Enterprise enterprise,
          final Datacenter datacenter, final User user, final FilterOptions filterOptions)
focal_class.return: Collection<VirtualDatacenter>
focal_class.signature: Collection<VirtualDatacenter> getVirtualDatacenters(Enterprise enterprise,
          final Datacenter datacenter, final User user, final FilterOptions filterOptions)
focal_class.class_method_signature: VirtualDatacenterService.getVirtualDatacentersByDatacenter(
          final Datacenter datacenter, final Integer startwith, final Integer limit,
          final String filter, final OrderByEnum orderByEnum, final Boolean asc)
focal_class.full_signature: public Collection<VirtualDatacenter> getVirtualDatacentersByDatacenter(
          final Datacenter datacenter, final Integer startwith, final Integer limit,
          final String filter, final OrderByEnum orderByEnum, final Boolean asc)
focal_class.identifier: getVirtualDatacentersByDatacenter
focal_class.modifiers: public
focal_class.parameters: (
          final Datacenter datacenter, final Integer startwith, final Integer limit,
          final String filter, final OrderByEnum orderByEnum, final Boolean asc)
focal_class.return: Collection<VirtualDatacenter>
focal_class.signature: Collection<VirtualDatacenter> getVirtualDatacentersByDatacenter(
          final Datacenter datacenter, final Integer startwith, final Integer limit,
          final String filter, final OrderByEnum orderByEnum, final Boolean asc)
focal_class.class_method_signature: VirtualDatacenterService.getVirtualDatacenter(final Integer id)
focal_class.full_signature: @Transactional(readOnly = true, propagation = Propagation.REQUIRED) public VirtualDatacenter getVirtualDatacenter(final Integer id)
focal_class.identifier: getVirtualDatacenter
focal_class.modifiers: @Transactional(readOnly = true, propagation = Propagation.REQUIRED) public
focal_class.parameters: (final Integer id)
focal_class.return: VirtualDatacenter
focal_class.signature: VirtualDatacenter getVirtualDatacenter(final Integer id)
focal_class.class_method_signature: VirtualDatacenterService.createVirtualDatacenter(final VirtualDatacenterDto dto,
          final Datacenter datacenter, final Enterprise enterprise)
focal_class.full_signature: @Transactional(readOnly = false, propagation = Propagation.REQUIRED) public VirtualDatacenter createVirtualDatacenter(final VirtualDatacenterDto dto,
          final Datacenter datacenter, final Enterprise enterprise)
focal_class.identifier: createVirtualDatacenter
focal_class.modifiers: @Transactional(readOnly = false, propagation = Propagation.REQUIRED) public
focal_class.parameters: (final VirtualDatacenterDto dto,
          final Datacenter datacenter, final Enterprise enterprise)
focal_class.return: VirtualDatacenter
focal_class.signature: VirtualDatacenter createVirtualDatacenter(final VirtualDatacenterDto dto,
          final Datacenter datacenter, final Enterprise enterprise)
focal_class.class_method_signature: VirtualDatacenterService.assignVirtualDatacenterToUser(final VirtualDatacenter vdc)
focal_class.full_signature: private void assignVirtualDatacenterToUser(final VirtualDatacenter vdc)
focal_class.identifier: assignVirtualDatacenterToUser
focal_class.modifiers: private
focal_class.parameters: (final VirtualDatacenter vdc)
focal_class.return: void
focal_class.signature: void assignVirtualDatacenterToUser(final VirtualDatacenter vdc)
focal_class.class_method_signature: VirtualDatacenterService.isValidEnterpriseDatacenter(final Enterprise enterprise,
          final Datacenter datacenter)
focal_class.full_signature: protected boolean isValidEnterpriseDatacenter(final Enterprise enterprise,
          final Datacenter datacenter)
focal_class.identifier: isValidEnterpriseDatacenter
focal_class.modifiers: protected
focal_class.parameters: (final Enterprise enterprise,
          final Datacenter datacenter)
focal_class.return: boolean
focal_class.signature: boolean isValidEnterpriseDatacenter(final Enterprise enterprise,
          final Datacenter datacenter)
focal_class.class_method_signature: VirtualDatacenterService.updateVirtualDatacenter(final Integer id,
          final VirtualDatacenterDto dto)
focal_class.full_signature: @Transactional(readOnly = false, propagation = Propagation.REQUIRED) public VirtualDatacenter updateVirtualDatacenter(final Integer id,
          final VirtualDatacenterDto dto)
focal_class.identifier: updateVirtualDatacenter
focal_class.modifiers: @Transactional(readOnly = false, propagation = Propagation.REQUIRED) public
focal_class.parameters: (final Integer id,
          final VirtualDatacenterDto dto)
focal_class.return: VirtualDatacenter
focal_class.signature: VirtualDatacenter updateVirtualDatacenter(final Integer id,
          final VirtualDatacenterDto dto)
focal_class.class_method_signature: VirtualDatacenterService.updateVirtualDatacenter(final VirtualDatacenter vdc,
          final VirtualDatacenterDto dto)
focal_class.full_signature: protected VirtualDatacenter updateVirtualDatacenter(final VirtualDatacenter vdc,
          final VirtualDatacenterDto dto)
focal_class.identifier: updateVirtualDatacenter
focal_class.modifiers: protected
focal_class.parameters: (final VirtualDatacenter vdc,
          final VirtualDatacenterDto dto)
focal_class.return: VirtualDatacenter
focal_class.signature: VirtualDatacenter updateVirtualDatacenter(final VirtualDatacenter vdc,
          final VirtualDatacenterDto dto)
focal_class.class_method_signature: VirtualDatacenterService.deleteVirtualDatacenter(final Integer id)
focal_class.full_signature: @Transactional(readOnly = false, propagation = Propagation.REQUIRED) public void deleteVirtualDatacenter(final Integer id)
focal_class.identifier: deleteVirtualDatacenter
focal_class.modifiers: @Transactional(readOnly = false, propagation = Propagation.REQUIRED) public
focal_class.parameters: (final Integer id)
focal_class.return: void
focal_class.signature: void deleteVirtualDatacenter(final Integer id)
focal_class.class_method_signature: VirtualDatacenterService.createNetwork()
focal_class.full_signature: private Network createNetwork()
focal_class.identifier: createNetwork
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Network
focal_class.signature: Network createNetwork()
focal_class.class_method_signature: VirtualDatacenterService.createVirtualDatacenter(final VirtualDatacenterDto dto,
          final Datacenter datacenter, final Enterprise enterprise, final Network network)
focal_class.full_signature: private VirtualDatacenter createVirtualDatacenter(final VirtualDatacenterDto dto,
          final Datacenter datacenter, final Enterprise enterprise, final Network network)
focal_class.identifier: createVirtualDatacenter
focal_class.modifiers: private
focal_class.parameters: (final VirtualDatacenterDto dto,
          final Datacenter datacenter, final Enterprise enterprise, final Network network)
focal_class.return: VirtualDatacenter
focal_class.signature: VirtualDatacenter createVirtualDatacenter(final VirtualDatacenterDto dto,
          final Datacenter datacenter, final Enterprise enterprise, final Network network)
focal_class.class_method_signature: VirtualDatacenterService.setLimits(final VirtualDatacenterDto dto, final VirtualDatacenter vdc)
focal_class.full_signature: private void setLimits(final VirtualDatacenterDto dto, final VirtualDatacenter vdc)
focal_class.identifier: setLimits
focal_class.modifiers: private
focal_class.parameters: (final VirtualDatacenterDto dto, final VirtualDatacenter vdc)
focal_class.return: void
focal_class.signature: void setLimits(final VirtualDatacenterDto dto, final VirtualDatacenter vdc)
focal_class.class_method_signature: VirtualDatacenterService.validateVirtualDatacenter(final VirtualDatacenter vdc, final VLANNetworkDto vlan,
          final Datacenter datacenter)
focal_class.full_signature: private void validateVirtualDatacenter(final VirtualDatacenter vdc, final VLANNetworkDto vlan,
          final Datacenter datacenter)
focal_class.identifier: validateVirtualDatacenter
focal_class.modifiers: private
focal_class.parameters: (final VirtualDatacenter vdc, final VLANNetworkDto vlan,
          final Datacenter datacenter)
focal_class.return: void
focal_class.signature: void validateVirtualDatacenter(final VirtualDatacenter vdc, final VLANNetworkDto vlan,
          final Datacenter datacenter)
focal_class.class_method_signature: VirtualDatacenterService.isValidVlanHardLimitPerVdc(final long vlansHard)
focal_class.full_signature: private boolean isValidVlanHardLimitPerVdc(final long vlansHard)
focal_class.identifier: isValidVlanHardLimitPerVdc
focal_class.modifiers: private
focal_class.parameters: (final long vlansHard)
focal_class.return: boolean
focal_class.signature: boolean isValidVlanHardLimitPerVdc(final long vlansHard)
focal_class.class_method_signature: VirtualDatacenterService.isValidHypervisorForDatacenter(final HypervisorType type,
          final Datacenter datacenter)
focal_class.full_signature: private boolean isValidHypervisorForDatacenter(final HypervisorType type,
          final Datacenter datacenter)
focal_class.identifier: isValidHypervisorForDatacenter
focal_class.modifiers: private
focal_class.parameters: (final HypervisorType type,
          final Datacenter datacenter)
focal_class.return: boolean
focal_class.signature: boolean isValidHypervisorForDatacenter(final HypervisorType type,
          final Datacenter datacenter)
focal_class.class_method_signature: VirtualDatacenterService.getNodeVirtualImageByEnterprise(final Enterprise enterprise)
focal_class.full_signature: public Collection<NodeVirtualImage> getNodeVirtualImageByEnterprise(final Enterprise enterprise)
focal_class.identifier: getNodeVirtualImageByEnterprise
focal_class.modifiers: public
focal_class.parameters: (final Enterprise enterprise)
focal_class.return: Collection<NodeVirtualImage>
focal_class.signature: Collection<NodeVirtualImage> getNodeVirtualImageByEnterprise(final Enterprise enterprise)
focal_class.class_method_signature: VirtualDatacenterService.detach(final VirtualDatacenter virtualDatacenter)
focal_class.full_signature: public void detach(final VirtualDatacenter virtualDatacenter)
focal_class.identifier: detach
focal_class.modifiers: public
focal_class.parameters: (final VirtualDatacenter virtualDatacenter)
focal_class.return: void
focal_class.signature: void detach(final VirtualDatacenter virtualDatacenter)
focal_class.superclass: extends DefaultApiService
focal_method.body: public Collection<VirtualDatacenter> getVirtualDatacenters(final Enterprise enterprise,
          final Datacenter datacenter, final FilterOptions filterOptions)
      {
          User user = userService.getCurrentUser();
          return getVirtualDatacenters(enterprise, datacenter, user, filterOptions);
      }
focal_method.class_method_signature: VirtualDatacenterService.getVirtualDatacenters(final Enterprise enterprise,
          final Datacenter datacenter, final FilterOptions filterOptions)
focal_method.full_signature: public Collection<VirtualDatacenter> getVirtualDatacenters(final Enterprise enterprise,
          final Datacenter datacenter, final FilterOptions filterOptions)
focal_method.identifier: getVirtualDatacenters
focal_method.invocations: getCurrentUser getVirtualDatacenters
focal_method.modifiers: public
focal_method.parameters: (final Enterprise enterprise,
          final Datacenter datacenter, final FilterOptions filterOptions)
focal_method.return: Collection<VirtualDatacenter>
focal_method.signature: Collection<VirtualDatacenter> getVirtualDatacenters(final Enterprise enterprise,
          final Datacenter datacenter, final FilterOptions filterOptions)