core : Code clean up

Removed duplicate logic and code from AddVmCommand and AddVmFromTemplateCommand, also removed old
way of retirevening of destination storage domain based on template

Change-Id: I550d3951e3bc5972c334248f8d3e24bb3792db44
core : Fixing NPE at AddVmFromScratch

Fixing NPE at AddVmFromScratchCommand. The error was caused by bad code

Change-Id: I73b5bc50ec3922a1370fe709cf6110afa01e7e13
engine: some autocompleter could be immutable

This patch turns the NumericConditionRelationAutoCompleter, the
StringConditionRelationAutoCompleter, the
StringOnlyEqualConditionRelationAutoCompleter and the
TimeConditionRelationAutoCompleter to immutable, adding a single
instance, so removing the need to create new instances.
It also changes the constructors of these classes to private.

Change-Id: I6697dbd094d50ad24e9ef3b0a710aff9cca4911a
engine-core: unit-test for SyntaxCheckerFactory

- adds unit test for SyntaxCheckerFactory
- changes SyntaxCheckerFactory to use imports for java.util classes
  instead of FQN

Change-Id: Icb8b044eadbd2c8264e067a1d56a200873849979
engine-core: SyntaxCheckerFactory cleanup

- removes the synchronization blocks, this may allow creating multiple
  instances in extreme cases, but the instances are immutable, they will
  do the same
- stores the the syntax checkers in fields rather than in a map

Change-Id: If2b632c3c13f4ba4b6f5373b942b29198ce6853d
userportal: Improve login process

This patch improves the common login infrastructure (BaseApplicationInit)
and implements UserPortal-specific logic that gets executed after successful
login (calling UserPortalLoginModel.UpdateIsENGINEUser method, and updating
UI according to "IsENGINEUser" property value).

Summary of changes:

1. Refactored BaseApplicationInit login-related methods.
   Added login model type parameter to BaseApplicationInit.

2. UserPortal ApplicationInit: instead of performing the actual UI
   login operation immediately after UserPortalLoginModel fires its
   LoggedInEvent, we call UserPortalLoginModel.UpdateIsENGINEUser method
   to determine user type. After we receive user type information (async
   callback), we store it into CurrentUserRole, which is a singleton
   object used to hold user role information. Then we proceed with the
   actual login operation.

   CurrentUserRole impacts the default place of the "main" section:
   - for user with isEngineUser==true,
     default "main" place is "Basic" main tab
   - for user with isEngineUser==false,
     default "main" place is "Extended" main tab

   CurrentUserRole also impacts "main" section UI:
   - for user with isEngineUser==true, the main tab panel is hidden
     (user has only access to "Basic" main tab content)
   - for user with isEngineUser==false, the main tab panel is visible
     (user has access to both "Basic" and "Extended" main tab content)

   This is a direct analogy to how original UserPortal handles user
   login and adapts UI according to "isEngineUser" user role information.

3. UserPortal now has its own specific place manager. This is required
   because UserPortal has two different default "main" section places,
   depending on the current user role. After the user logs in, place
   manager ensures that he is properly redirected to appropriate default
   "main" section place.

4. Created LoggedInExtendedPlaceGatekeeper that protects "main" section
   places within the "Extended" main tab.

   Gatekeeper strategy in UserPortal is following:
   - LoggedInExtendedPlaceGatekeeper is the default gatekeeper
   - LoginSectionPresenter (#login) uses @NoGatekeeper as usual
   - MainTabBasicPresenter (#basic) uses @UseGatekeeper
     with standard LoggedInGatekeeper

   This properly protects "Extended" main tab places from being accessed
   by unauthorized users (users with isEngineUser==false), even if they
   manipulate application URL.

Change-Id: I9933d03dba77efa0f51212c93619c433f343a5da
core : During creation of AddVmTemplates, vm is created without disks

The following patch is fixing two bugs:
1. During vm creation, vm devices were not add.
2. The copied image was created with the same image_group_id, even that the template for vm was set to blank

Change-Id: I1edfa7e343c27dee8ecab211bef28bad94e0dcfd
core: Use new MultiValueMapUtils

Use the new MultiValueMapUtils class instead of repetative code that
adds a value to a colletion in a map value.

Change-Id: Id13ee9515000a181fa756dbb1bfebc695079d150
core: Cleanup VmDAODbFacadeImpl

Use single static instance of the row mapper instead of creating a new
for each call, as per the guidelines at
http://ovirt.org/wiki/Backend_Coding_Standards.

Change-Id: Ifaa0c197c3b376aad96be110640f15b3fe6a7d17
Need Option To Supply SD On Disk Creation

Change-Id: Icc5082cf679c3d07015c9ba48d46c37c66b2d927
restapi: RSDL - fix vm-start params

Change-Id: If0c868c352c991b310ab5597fd601b4f632ed5dc
restapi: RSDL - Fix Iscsi Actions Params

Change-Id: Id282624a7e83446200517cd8407fa3b4948cc723
restapi: RSDL Host Reboot After Installation

Change-Id: Idbb779116e6cea4f57351b9219db86dfdb26e76f
restapi: RSDL - Add Host To Vm Create/Update

Change-Id: If49125a055724ba94b83a814ba85717746ee44bf
core: Fix VmDAO.getForImage to return multiple VMs

Since the introduction of the shared disc feature, an image is not
assossiated uniquely to a single VM.

The DAO was fixed to represent this.

Change-Id: I7100a7aa15524d35f664b49248e5a37cbfb6a32c
core: new GetVmsByImageGuidQuery

A new query to return VMs connected to a given image, for use in
(future) UI features.

Change-Id: Ia20cad668c6f6c792a6c5b8b3b394b07c54de804
core: Cleanup VmTemplateDAODbFacadeImpl

Clean up VmTemplateDAODbFacadeImpl. Use a static instance of the row
mapper, as per http://ovirt.org/wiki/Backend_Coding_Standards.

Change-Id: I6c23e68bcd17aa754944d6fbf2f6023973a1d0bd
core: IMAGE_ID and IMAGE_GROUP_ID in FixturesTool

Moved these constants from VmDAOTest to FixturesTool so they can be
easily used in others tests too.

Change-Id: I5d37fa0363e7233fc23bca124977d30ba34df154
core: VmTamplateDAO.getAllForImage

Added a new method to retreive all the VM Templates assossiated to a
given image, similar to the one in VmDAO (see change
I7100a7aa15524d35f664b49248e5a37cbfb6a32c).

The change includes the database implementation, the java call to it, a
test and some test data.

Change-Id: Idcf94e6b2435d8c5070d9609c1a9a05000e9d147
core: new GetVmTemplatesByImageGuidQuery

A new query to return VM Templates connected to a given image, for
use in (future) UI features.

Change-Id: I01b420c47b1411f9d3632a1f9bc0fb8cd18befc7