com.microfocus.awm.control.toolexecution

## Class FileOutputParameter

- java.lang.Object
- - com.microfocus.awm.control.toolexecution.internal.AbstractToolParameter
  - - com.microfocus.awm.control.toolexecution.ToolOutputParameter
    - - com.microfocus.awm.control.toolexecution.FileOutputParameter

- All Implemented Interfaces:
    IDynamicObject, IFileOutputParameter, IFileParameter, IToolOutputParameter, IToolParameter
  Direct Known Subclasses:
    TableOutputParameter

      public class FileOutputParameter
      extends ToolOutputParameter
      implements IFileOutputParameter

  Basic implementation of `IFileOutputParameter`. It allows to return a file by either `IFileContents` or an `IFileReference`.
  Author:
    Micro Focus

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileOutputParameter(IModeledFileOutputParameter pModeledOutputParameter, IFileContents pContents)` Creates a file output parameter from `IFileContents`.
    `FileOutputParameter(IModeledFileOutputParameter pModeledOutputParameter, IFileReference pFileReference)` Creates a file output parameter from `IFileReference`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `FileDescriptor` | `getTargetID()`

    - ### Methods inherited from class com.microfocus.awm.control.toolexecution.ToolOutputParameter

      `getModelObject, getValue, toString`

    - ### Methods inherited from class com.microfocus.awm.control.toolexecution.internal.AbstractToolParameter

      `getAttributes, isMassProcessingParameter`

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

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

    - ### Methods inherited from interface com.microfocus.awm.model.toolexecution.IToolOutputParameter

      `getModelObject, getValue`

    - ### Methods inherited from interface com.microfocus.awm.model.toolexecution.IToolParameter

      `isMassProcessingParameter`

    - ### Methods inherited from interface com.microfocus.awm.model.toolexecution.IDynamicObject

      `getAttributes, getAttributeValue, getComplexAttributes`

- - ### Constructor Detail

    - #### FileOutputParameter

          public FileOutputParameter(IModeledFileOutputParameter pModeledOutputParameter,
                                     IFileContents pContents)

      Creates a file output parameter from `IFileContents`. This is only allowed for file descriptors with the type `EFileTypes.INPUT_STREAM`. Any other file descriptor type will cause an exception after tool execution.

      This is supposed to be used by tools that create file descriptor contents but don't need to create a physical file.

      Parameters:
        `pModeledOutputParameter` - the modeled file output parameter
        `pContents` - the contents to be associated to the file descriptor

    - #### FileOutputParameter

          public FileOutputParameter(IModeledFileOutputParameter pModeledOutputParameter,
                                     IFileReference pFileReference)

      Creates a file output parameter from `IFileReference`. This is only allowed for all file descriptor types that can be described by a `IFileReference`. The only not supported type by default is `EFileTypes.INPUT_STREAM`.

      This is supposed to be used by tools that find or create a file and want to return it as a reference.

      Parameters:
        `pModeledOutputParameter` - the modeled file output parameter
        `pFileReference` - the file reference

  - ### Method Detail

    - #### getTargetID

          public FileDescriptor getTargetID()

      Specified by:
        `getTargetID` in interface `IFileParameter`
      Specified by:
        `getTargetID` in interface `IToolOutputParameter`
      Specified by:
        `getTargetID` in interface `IToolParameter`
      Overrides:
        `getTargetID` in class `AbstractToolParameter`
      Returns:
        the target ID, which can be `null`

Copyright © 2015 Micro Focus GmbH. All rights reserved.