Package ghidra.plugins.importer.batch

# Class BatchGroup

java.lang.Object
ghidra.plugins.importer.batch.BatchGroup

public class BatchGroup extends Object
A group of `LoadSpec`s (possibly from different user added sources) that have a common `BatchSegregatingCriteria`.

All the Apps must have the same set of `LoadSpec`s to be included in the same BatchGroup.

Each BatchGroup has a single selected (`BatchGroupLoadSpec`) that applies to all the Apps in the group.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `BatchGroup.BatchLoadConfig`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BatchGroup(BatchSegregatingCriteria criteria)`
  Creates a new `BatchGroup` keyed on the specified `criteria`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(ByteProvider provider, Collection<LoadSpec> loadSpecs, FSRL fsrl, UserAddedSourceInfo uasi)`
  Adds `LoadSpec`s to this group.
  `List<BatchGroup.BatchLoadConfig>`
  `getBatchLoadConfig()`
  Returns the list of current `BatchGroup.BatchLoadConfig` in this group.
  `BatchSegregatingCriteria`
  `getCriteria()`
  Returns the `BatchSegregatingCriteria` of this group.
  `BatchGroupLoadSpec`
  `getSelectedBatchGroupLoadSpec()`
  Returns the selected `BatchGroupLoadSpec` that applies to the entire `BatchGroup`.
  `boolean`
  `isEmpty()`
  Returns true if there are no applications in this group.
  `boolean`
  `isEnabled()`
  Returns true if this group is 'enabled', which means that it has a selected `BatchGroupLoadSpec` and the user has chosen to mark this group as importable.
  `void`
  `removeDescendantsOf(FSRL fsrl)`
  Removes any applications that are inside the specified container file.
  `void`
  `setEnabled(boolean enabled)`
  Sets the enabled status of this group.
  `void`
  `setSelectedBatchGroupLoadSpec(BatchGroupLoadSpec selectedBatchGroupLoadSpec)`
  Sets the current `BatchGroupLoadSpec` for the entire group of applications.
  `int`
  `size()`
  Returns the number of applications in this group.
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### BatchGroup

    public BatchGroup(BatchSegregatingCriteria criteria)
    Creates a new `BatchGroup` keyed on the specified `criteria`.
    Parameters:
      `criteria` - `BatchSegregatingCriteria` of this `BatchGroup`.

- ## Method Details

  - ### add

    public void add(ByteProvider provider, Collection<LoadSpec> loadSpecs, FSRL fsrl, UserAddedSourceInfo uasi)
    Adds `LoadSpec`s to this group.
    Parameters:
      `provider` - The `ByteProvider`.
      `loadSpecs` - `LoadSpec`s to add to this group.
      `fsrl` - `FSRL` of the application's import source file.
      `uasi` - `UserAddedSourceInfo`

  - ### getSelectedBatchGroupLoadSpec

    public BatchGroupLoadSpec getSelectedBatchGroupLoadSpec()
    Returns the selected `BatchGroupLoadSpec` that applies to the entire `BatchGroup`.
    Returns:
      selected `BatchGroupLoadSpec` that applies to the entire `BatchGroup`.

  - ### setSelectedBatchGroupLoadSpec

    public void setSelectedBatchGroupLoadSpec(BatchGroupLoadSpec selectedBatchGroupLoadSpec)
    Sets the current `BatchGroupLoadSpec` for the entire group of applications.
    Parameters:
      `selectedBatchGroupLoadSpec` - `BatchGroupLoadSpec` to set

  - ### isEnabled

    public boolean isEnabled()
    Returns true if this group is 'enabled', which means that it has a selected `BatchGroupLoadSpec` and the user has chosen to mark this group as importable.
    Returns:
      boolean enabled status.

  - ### setEnabled

    public void setEnabled(boolean enabled)
    Sets the enabled status of this group.
    Parameters:
      `enabled` - boolean

  - ### getCriteria

    public BatchSegregatingCriteria getCriteria()
    Returns the `BatchSegregatingCriteria` of this group.
    Returns:
      `BatchSegregatingCriteria` of this group.

  - ### size

    public int size()
    Returns the number of applications in this group.
    Returns:
      number of applications in this group.

  - ### isEmpty

    public boolean isEmpty()
    Returns true if there are no applications in this group.
    Returns:
      boolean true if there are no applications in this group.

  - ### getBatchLoadConfig

    public List<BatchGroup.BatchLoadConfig> getBatchLoadConfig()
    Returns the list of current `BatchGroup.BatchLoadConfig` in this group.
    Returns:
      `List` of `BatchGroup.BatchLoadConfig` `BatchGroup.BatchLoadConfig` wrappers.

  - ### removeDescendantsOf

    public void removeDescendantsOf(FSRL fsrl)
    Removes any applications that are inside the specified container file.
    Parameters:
      `fsrl` - `FSRL` of a container.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`