Search in sources :

Example 21 with GlusterServerHook

use of org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook in project ovirt-engine by oVirt.

the class GlusterHookSyncJob method buildServerHook.

private GlusterServerHook buildServerHook(Guid serverId, Guid hookId, GlusterHookEntity returnedHook) {
    GlusterServerHook serverHook = new GlusterServerHook();
    serverHook.setHookId(hookId);
    serverHook.setServerId(serverId);
    serverHook.setStatus(returnedHook.getStatus());
    serverHook.setContentType(returnedHook.getContentType());
    serverHook.setChecksum(returnedHook.getChecksum());
    return serverHook;
}
Also used : GlusterServerHook(org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook)

Example 22 with GlusterServerHook

use of org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook in project ovirt-engine by oVirt.

the class GlusterHookResolveConflictsPopupView method initEditors.

private void initEditors() {
    contentSourcesTable = new EntityModelCellTable<>(false, true);
    statusEditor = new EntityModelLabelEditor<>(new EnumRenderer<GlusterHookStatus>());
    resolveContentConflict = new EntityModelCheckBoxEditor(Align.RIGHT);
    useContentSourceEditor = new ListModelListBoxEditor<>(new NullSafeRenderer<GlusterServerHook>() {

        @Override
        protected String renderNullSafe(GlusterServerHook hook) {
            return hook.getServerName();
        }
    });
    resolveStatusConflict = new EntityModelCheckBoxEditor(Align.RIGHT);
    // $NON-NLS-1$
    resolveStatusConflictEnable = new EntityModelRadioButtonEditor("status", Align.RIGHT);
    // $NON-NLS-1$
    resolveStatusConflictDisable = new EntityModelRadioButtonEditor("status", Align.RIGHT);
    resolveMissingConflict = new EntityModelCheckBoxEditor(Align.RIGHT);
    // $NON-NLS-1$
    resolveMissingConflictCopyEditor = new EntityModelRadioButtonEditor("missing_hook", Align.RIGHT);
    // $NON-NLS-1$
    resolveMissingConflictRemoveEditor = new EntityModelRadioButtonEditor("missing_hook", Align.RIGHT);
}
Also used : EnumRenderer(org.ovirt.engine.ui.common.widget.renderer.EnumRenderer) GlusterServerHook(org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook) NullSafeRenderer(org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer) EntityModelCheckBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor) EntityModelRadioButtonEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor)

Aggregations

GlusterServerHook (org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook)22 GlusterHookEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity)8 ArrayList (java.util.ArrayList)6 Test (org.junit.Test)5 VDS (org.ovirt.engine.core.common.businessentities.VDS)5 Guid (org.ovirt.engine.core.compat.Guid)5 GlusterHookContentType (org.ovirt.engine.core.common.businessentities.gluster.GlusterHookContentType)4 VDSReturnValue (org.ovirt.engine.core.common.vdscommands.VDSReturnValue)4 List (java.util.List)3 Callable (java.util.concurrent.Callable)3 GlusterHookStatus (org.ovirt.engine.core.common.businessentities.gluster.GlusterHookStatus)3 GlusterHookVDSParameters (org.ovirt.engine.core.common.vdscommands.gluster.GlusterHookVDSParameters)3 AsyncDataProvider (org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider)3 EntityModel (org.ovirt.engine.ui.uicommonweb.models.EntityModel)3 HashMap (java.util.HashMap)2 HashSet (java.util.HashSet)2 Set (java.util.Set)2 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)2 ActionType (org.ovirt.engine.core.common.action.ActionType)2 GlusterClusterParameters (org.ovirt.engine.core.common.action.gluster.GlusterClusterParameters)2