core: clean up businessentity hashCode() methods [part 2]

Organize hashCode() methods into a consistent format and consistent
ordering with equals().  This will make field-by-field comparison and
maintenance easier.

Change-Id: If925715cc91c1b4a53a7f6d212ac51043412db53
Signed-off-by: Greg Padgett <gpadgett@redhat.com>
restapi : NullPointerException when Authorization header is passed(#916085)

When invalid authorization header is passed a null pointer
exception is thrown on the server resulting in internal
server error.

Change-Id: I10b580dcc3fddbec8ccd80130e977aeb4ef37fb2
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=916085
Signed-off-by: Ravi Nori <rnori@redhat.com>
restapi : Missing RSDL descriptor for host.install(image)(#919856)

When installing host using RESTapi, there is no option in the
API to select which iso should be used, unlike the UI. Also
there is on indication which ISO is selected.

Change-Id: I103e75154ce025e82ff7c51f358f527436ab30dc
Bug-Url: https://bugzilla.redhat.com/919856
Signed-off-by: Ravi Nori <rnori@redhat.com>
restapi: #853739 - Actions Should Return Entities In Body

On actions api returns parameters in response body instead
of actual action result.

https://bugzilla.redhat.com/853739

Change-Id: Ic636b7205fa7b6fbb5d98efdbcd7976e9beb2187
Signed-off-by: Ori Liel <oliel@redhat.com>
Signed-off-by: Ravi Nori <rnori@redhat.com>
engine,webadmin: Show VM as stateless in audit log

Show different message in audit log (Events), in case a VM
was started in stateless mode
(can be specified in RunOnce dialog - 'stateless' checkbox option or
in Edit VM dialog (for desktop only).

Change-Id: Id9bb0bd88e544880406c340afb7e213041b2f845
Bug-Url: https://bugzilla.redhat.com/907997
Signed-off-by: Libor Spevak <lspevak@redhat.com>
restapi: rename /api rsdl metadata to avoid collisions

api.xsd already has "api" element what can
lead to element->type mapping collisions in some
client bindings

Change-Id: Ic7b0421e4e01f147e55015adeabdcdefd9463f23
Signed-off-by: Michael Pasternak <mpastern@redhat.com>
webadmin: fix NPE in WebAdminHostPageServletTest

Two @Before methods in WebAdminHostPageServletTest is causing the tests
to fail with NPE on my laptop. Merging them into single one resolves the
problem.

Change-Id: Ib76f7bd842d3b58c522e3e97609a9b55d5a79902
Signed-off-by: Shireesh Anjal <sanjal@redhat.com>
restapi : Creating template by specifing vm name, does not work (#915285)

Creating template by specifing vm name, does not work,
works only when vm id is specified.

This patch lets the user create a template from a VM
by specifying the vm name.

Change-Id: Ibe6ff6059c22a853c76a0720e5c9e330f600712b
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=915285
Signed-off-by: Ravi Nori <rnori@redhat.com>
webadmin: Select english when browser is other locale

- Fixed ability to select English (which was default) when
the browser default was a different locale. Selecting
English would reset to the browsers default locale.
- Fixed issue where unsupported locale would show empty selected
label.

Change-Id: Id1b31fe65c306602c45c85857ccc7392e16dc8d3
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=894288
Signed-off-by: Alexander Wels <awels@redhat.com>
webadmin: UI plugin dialog API improved

This patch improves the existing UI plugin API for handling dialogs.

(0) Minor dialog / UI plugin infrastructure improvements

(1) Function improved: showDialog

New signature:
    showDialog(title, dialogToken, contentUrl, width, height [, options])

Example usage:
    showDialog('My Dialog', 'my-dialog',
        'http://www.foobar.com/',
        '800px', '600px',
        {
            // Default value = empty array (no buttons)
            buttons: [
                {
                    label: 'Do stuff',
                    onClick: function() {
                        alert('Bump!');
                    }
                }
            ],

            // Default value = false
            resizeEnabled: true,

            // Default value = true
            closeIconVisible: true,

            // Default value = true
            closeOnEscKey: true
        }
    );

The implementation now uses WebAdmin's GWTP dialog infrastructure
via non-singleton DynamicUrlContentPopupPresenterWidget component
so that multiple dynamic dialog instances can be shown at a time
if necessary.

(2) New function: setDialogContentUrl

New signature:
    setDialogContentUrl(dialogToken, contentUrl)

Example usage:
    setDialogContentUrl('my-dialog', 'http://www.example.com/')

(3) New function: closeDialog

New signature:
    closeDialog(dialogToken)

Example usage:
    closeDialog('my-dialog')

Change-Id: I4654a25bed7122c45d432e3860ed710fa4ca3dd9
Signed-off-by: Vojtech Szocs <vszocs@redhat.com>
webadmin: Control UI plugin dynamic tab alignment

This patch improves the existing UI plugin API for handling
dynamic tabs.

(1) Function improved: addMainTab

New signature:
    addMainTab(label, historyToken, contentUrl [, options])

Example usage:

    // Tab is left-aligned by default
    addMainTab('Foo Tab', 'foo-tab', 'http://www.foo.com/');

    // Tab is right-aligned via options object
    addMainTab('Foo Tab', 'foo-tab', 'http://www.foo.com/', {
        alignRight: true
    });

(2) Function improved: addSubTab

New signature:
    addSubTab(entityTypeName, label, historyToken, contentUrl
        [, options])

Example usage:

    // Tab is left-aligned by default
    addSubTab('VirtualMachine',
        'Bar Tab', 'bar-tab', 'http://www.bar.com/');

    // Tab is right-aligned via options object
    addSubTab('VirtualMachine',
        'Bar Tab', 'bar-tab', 'http://www.bar.com/', {
            alignRight: true
        }
    );

Signed-off-by: Spenser Shumaker <sshumake@redhat.com>
Signed-off-by: Vojtech Szocs <vszocs@redhat.com>
Change-Id: Icd6929538fd106d0c54d162dfd21f8946254ce5f
core: update DiskImageDynamic on RemoveSnapshot

* Fetching image's size on endSuccessfully of
  RemoveSnapshotSingleDiskCommand.
* Updating DiskImageDynamic with the retrieved value.

Change-Id: Ie124fb42c34860ee349e91172e0248a2d824b127
Bug-Url: https://bugzilla.redhat.com/923864
Signed-off-by: Daniel Erez <derez@redhat.com>
engine: remove redundant check from setter in StorageDomain

checking if the status the same or the old value was null is not needed
in setters

Change-Id: I0deb82036c08869a0def80fd1d5bc50885c5e5bc
Signed-off-by: Laszlo Hornyak <lhornyak@redhat.com>
webadmin: UI-plugins MainTabActionButton CommandLocation

Add ability to set button location using addMainTabActionButton API.

For example:

    addMainTabActionButton('Host', 'My Button', {
        location: 'OnlyFromContext'
    });

Supported values for 'location':
* OnlyFromContext
* OnlyFromToolBar
* ContextAndToolBar (default)

Change-Id: I034be5af1b2dcbaad4bfce9784d74410a92fb4be
Signed-off-by: Daniel Erez <derez@redhat.com>
Signed-off-by: Vojtech Szocs <vszocs@redhat.com>
webadmin,userportal: Remove '__gwt_historyFrame' iframe

This iframe is needed only for IE6-7 support. Since we support
IE9+, having this iframe within GWT host page is just redundant.

Change-Id: I5b5946a536fbc441cb6dca75f8dc36760164b534
Signed-off-by: Vojtech Szocs <vszocs@redhat.com>
webadmin,userportal: Drop support for IE6-7

This patch removes "ie6" user agent from default GWT compilation,
which also means less permutations to compile and faster builds
in general.

Change-Id: I5820bfe4147d5429714ed6388bcc8d62ecb4e40c
Signed-off-by: Vojtech Szocs <vszocs@redhat.com>
webadmin: grids jump to last selected entity

- Fixed grids jumping to last selected entity on refresh.

Change-Id: I0f34a369ba1074456614ad65b7e4cc77af963853
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=882618
Signed-off-by: Alexander Wels <awels@redhat.com>