core: AddExistingFileStorageDomain test modifiers

Fixed modifiers in AddExistingFileStorageDomainCommandTest to solve
compilation warnings.

Change-Id: Id4971dc826e36f01a1bac5ac7aba5e39f40cada7
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: AddExistingBlockStorageDomain test modidiers

Fixed AddExistingBlockStorageDomainCommandTest's modifiers to solve
compilation warnings.

Change-Id: I3433186b901f2de4bf037bba54b09171c09505cd
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: AddExistingBlockStorageDomain test anyList()

Use the standard org.mockito.Matchers.anyList() in order to improve code
readability.

Change-Id: If6292cc3018b23eba593d6d9c4b515b7da10fb49
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: introduce AddStorageDomainCommonTest

An initial test case for AddStorageDomainCommon, focusing mainly
on its canDoAction() method.

Change-Id: I5e07f7fe5988dab9f37ecc040cdf3d839d776e23
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: AddStorageDomainCommand diamond generics

Use Java 7 style diamond generics to increase readability.

Change-Id: If15bd4f0215e3bc2348c6eef99df4edcc2bc71da
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Early return AddStorageDomainCommand's CDA

Used early return to improve readability.

Change-Id: Ibed33518e5becb96b0de331376d158df29f06dca
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: isStorageFormatSupportedByStoragePool

Simplified the boolean expression in
AddStorageDomainCommand#isStorageFormatSupportedByStoragePool() for
better readability.

Change-Id: I59a9aa5ec041da4b9930a534c5c2fc23cb542767
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Simplify isStorageFormatCompatibleWithDomain()

Simplified
AddStorageDomainCommand.isStorageFormatCompatibleWithDomain() in
order to increase readability.

Change-Id: I1825105defd4c4aeb3f7ad20395730fb1ba8e990
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: AddStorageDomainCommand singleton list

Use Collections.singletonList instead of Arrays.asList wherever possible
to improve readability and increase performance.

Change-Id: Ic973514f0545256238725f7aba17ad9cc850318e
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: AddStorageDomainCommand constructor

Made the constructor protected, as per Java's conventions for abstract
classes.

Change-Id: If08def362e0797de3b2acfe1ee917ff09abcdf8e
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: AddStorageDomainCommand javadoc cleanup

Removed useless javadoc for class' constructor.

Change-Id: I7efbe13e83c978d0eb8eb71f543adec2aef69406
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: AddStorageDomainCommand use of HashMap

Weaken HashMap declarations to Maps wherever possible.

Change-Id: Ifcbecd38ef12b6f42c99c55a79dc6c3eb39886fb
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: AddStorageDomainCommand.getTargetStoragePool

Extracted AddStorageDomainCommand.getTargetStoragePool for later use
(not to mention the increased readability).

Change-Id: I3776beb5a7426e010f05ca0b4f3dffb128346ed7
Signed-off-by: Allon Mureinik <amureini@redhat.com>