Commands (gCube Resource Management Portlet 6.4.0-4.7.0-150651 API)
Date: 2017-10-12

org.gcube.portlets.admin.resourcemanagement.client.utils

## Class Commands

- java.lang.Object
- - org.gcube.portlets.admin.resourcemanagement.client.utils.Commands

-     public class Commands
      extends Object

  Here is a set of commands executed inside callbacks that involve interactions with client-side widgets. Additionally other commands are provided for general purpose functionalities (e.g. refresh components, main components lookup, ...).m
  Author:
    Daniele Strollo (ISTI-CNR)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Commands()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `buildAddToScopeReport(org.gcube.resourcemanagement.support.shared.types.Tuple<String> result)`
    `static void` | `buildRemoveFromScopeReport(org.gcube.resourcemanagement.support.shared.types.Tuple<String> result)`
    `static void` | `clearResourceGridPanel()`
    `static void` | `clearResourceTreePanel()`
    `static void` | `doFilterResourceDetailsGrid(Object caller, String scope, String resourceType, String resourceSubType)` Filters the result of resource detail grid by using its subtye.
    `static void` | `doGetAvailableScopes(Object caller)`
    `static void` | `doGetRelatedResources(String type, String id, String scope)`
    `static void` | `doGetResourceProfile(Object caller, String scope, String resourceType, String resourceID)`
    `static void` | `doGetResourceProfileByID(Object caller, String scope, String resourceID)`
    `static void` | `doLoadResourceDetailsGrid(Object caller, String scope, String resourceType)`
    `static void` | `doLoadResourceTree(Object caller, String scope)` Creates a new Navigation Tree for the resources in a given scope.
    `static void` | `doLoadWSResourceDetailsGrid(Object caller, String scope)`
    `static void` | `doSetSuperUser(boolean state)`
    `static void` | `evaluateCredentials(com.extjs.gxt.ui.client.widget.Component w, org.gcube.resourcemanagement.support.shared.types.UserGroup... args)` Checks that a component is enabled for the current credentials.
    `static com.extjs.gxt.ui.client.widget.grid.Grid<com.extjs.gxt.ui.client.data.ModelData>` | `getResourceDetailGrid()`
    `static ResourceDetailsPanel` | `getResourceDetailPanel()`
    `static MainContainer` | `getViewport()`
    `static void` | `mask(String message, com.extjs.gxt.ui.client.widget.Component component)` When masking the component show the rotating gear.
    `static void` | `mask(String message, String... componentIDs)`
    `static void` | `refreshConsole()`
    `static void` | `refreshProgressBar()` COMMANDS FOR RPC REQUESTS TO THE SERVLET
    `static void` | `refreshResourceDetails()`
    `static void` | `refreshResourceGrid()`
    `static void` | `refreshResourceTree()` GENERAL PURPOSE UTILITY COMMANDS
    `static void` | `refreshViewport()`
    `static void` | `setLoadedResources(int number)`
    `static void` | `setStatusScope(String scope)` In the status bar sets the currently selected scope.
    `static void` | `showHideConsole()`
    `static void` | `showPopup(String title, String text)`
    `static void` | `showPopup(String title, String text, int delayMills)`
    `static void` | `unmask(com.extjs.gxt.ui.client.widget.Component component)`
    `static void` | `unmask(String... componentIDs)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Commands

          public Commands()

  - ### Method Detail

    - #### refreshProgressBar

          public static final void refreshProgressBar()

      COMMANDS FOR RPC REQUESTS TO THE SERVLET

    - #### doLoadResourceTree

          public static final void doLoadResourceTree(Object caller,
                                                      String scope)

      Creates a new Navigation Tree for the resources in a given scope.
      Parameters:
        `caller` - for logging reasons the caller must be passed as parameter
        `scope` - the scope for resources to retrieve

    - #### doLoadResourceDetailsGrid

          public static final void doLoadResourceDetailsGrid(Object caller,
                                                             String scope,
                                                             String resourceType)

    - #### doGetRelatedResources

          public static final void doGetRelatedResources(String type,
                                                         String id,
                                                         String scope)

    - #### doLoadWSResourceDetailsGrid

          public static final void doLoadWSResourceDetailsGrid(Object caller,
                                                               String scope)

    - #### doFilterResourceDetailsGrid

          public static final void doFilterResourceDetailsGrid(Object caller,
                                                               String scope,
                                                               String resourceType,
                                                               String resourceSubType)

      Filters the result of resource detail grid by using its subtye.
      Parameters:
        `caller` -
        `resourceSubType` -

    - #### doGetResourceProfileByID

          public static final void doGetResourceProfileByID(Object caller,
                                                            String scope,
                                                            String resourceID)

    - #### doGetResourceProfile

          public static final void doGetResourceProfile(Object caller,
                                                        String scope,
                                                        String resourceType,
                                                        String resourceID)

    - #### doGetAvailableScopes

          public static final void doGetAvailableScopes(Object caller)

    - #### buildAddToScopeReport

          public static final void buildAddToScopeReport(org.gcube.resourcemanagement.support.shared.types.Tuple<String> result)

    - #### buildRemoveFromScopeReport

          public static final void buildRemoveFromScopeReport(org.gcube.resourcemanagement.support.shared.types.Tuple<String> result)

    - #### doSetSuperUser

          public static final void doSetSuperUser(boolean state)

    - #### refreshResourceTree

          public static final void refreshResourceTree()

      GENERAL PURPOSE UTILITY COMMANDS

    - #### refreshResourceGrid

          public static final void refreshResourceGrid()

    - #### clearResourceTreePanel

          public static void clearResourceTreePanel()

    - #### clearResourceGridPanel

          public static void clearResourceGridPanel()

    - #### showHideConsole

          public static void showHideConsole()

    - #### getViewport

          public static MainContainer getViewport()

    - #### refreshViewport

          public static void refreshViewport()

    - #### refreshConsole

          public static void refreshConsole()

    - #### refreshResourceDetails

          public static void refreshResourceDetails()

    - #### getResourceDetailGrid

          public static com.extjs.gxt.ui.client.widget.grid.Grid<com.extjs.gxt.ui.client.data.ModelData> getResourceDetailGrid()

    - #### getResourceDetailPanel

          public static ResourceDetailsPanel getResourceDetailPanel()

    - #### setStatusScope

          public static void setStatusScope(String scope)

      In the status bar sets the currently selected scope.
      Parameters:
        `scope` -

    - #### setLoadedResources

          public static void setLoadedResources(int number)

    - #### mask

          public static void mask(String message,
                                  com.extjs.gxt.ui.client.widget.Component component)

      When masking the component show the rotating gear.
      Parameters:
        `component` - the element to mask
        `message` - the message to show during loading

    - #### unmask

          public static void unmask(com.extjs.gxt.ui.client.widget.Component component)

    - #### mask

          public static void mask(String message,
                                  String... componentIDs)

    - #### unmask

          public static void unmask(String... componentIDs)

    - #### showPopup

          public static void showPopup(String title,
                                       String text)

    - #### showPopup

          public static void showPopup(String title,
                                       String text,
                                       int delayMills)

    - #### evaluateCredentials

          public static final void evaluateCredentials(com.extjs.gxt.ui.client.widget.Component w,
                                                       org.gcube.resourcemanagement.support.shared.types.UserGroup... args)

      Checks that a component is enabled for the current credentials. If not it will be disabled and hidden.
      Parameters:
        `w` -
        `args` - a list of enabled groups.

Copyright © 2017. All Rights Reserved.