Interface IScript

All Superinterfaces:
IAdaptable, IChangeListener, IHasCustomValues, IHasValues, IPObject, IUniqueObject

public interface IScript extends IUniqueObject
Since:
3.24.10
  • Field Details

  • Method Details

    • getAuthor

      @NotNull IUser getAuthor()
      Returns:
      the original author (creator) of the script.
    • getTitle

      @Nullable String getTitle()
    • setTitle

      void setTitle(@NotNull String title)
    • getCreated

      @Nullable Date getCreated()
    • getUpdated

      @Nullable Date getUpdated()
    • getUpdatedBy

      @NotNull IUser getUpdatedBy()
    • delete

      void delete()
      Deletes this Script and removes all its files from the repository.
    • getContentStream

      @NotNull InputStream getContentStream()
      Returns:
      the script's contents from the default script file (script.js). The content is not validated or interpreted in any way.
    • setContent

      void setContent(@NotNull InputStream content)
      Sets the script's content. (The code to be executed.) The content is not validated or interpreted in any way.
    • getType

      @Nullable IScriptTypeOpt getType()
    • setType

      void setType(@NotNull IScriptTypeOpt type)
      Sets the script's Type. Only the Save Hook, Condition, and Function types are allowed.
    • getMaintainers

      @NotNull IPObjectList<IUser> getMaintainers()
      Returns:
      the users IUser responsible for maintaining the script.
    • addMaintainer

      boolean addMaintainer(@NotNull IUser participant)
      Adds a user to the list of maintainers.
      Parameters:
      participant - - the IUser to add to the list of maintainers.
      Returns:
      true, if the maintainer was added (false if Script already has maintainer).
    • removeMaintainer

      boolean removeMaintainer(@NotNull IUser participant)
      Removes a user from the list of maintainers.
      Parameters:
      participant - - the IUser to remove from the list of maintainers
      Returns:
      true if maintainer was removed, false if Work Item doesn't contain a participant.
    • getReferenceName

      @Nullable String getReferenceName()
      Returns:
      the script's Reference Name, allowing you to reference it from other scripts.
    • setReferenceName

      void setReferenceName(@NotNull String referenceName)
      Sets the script's Reference Name, allowing you to reference it from other scripts.

      The Name can only contain alpha-numeric values, dashes, and underscores.

    • getReferencePath

      @Nullable String getReferencePath()
      Returns:
      the reference path in the form of projectId/referenceName that you can use to reference (import) it into other scripts.
    • getDescription

      @Nullable Text getDescription()
      Returns:
      script's Description text.
    • setDescription

      void setDescription(@Nullable Text description)
      Sets the script's Description text.
    • isMonitored

      boolean isMonitored()
      Returns:
      whether this Script should be included in Script Monitoring.
    • setMonitored

      void setMonitored(boolean monitored)
      Sets whether this Script should be included in Script Monitoring.
    • logsStored

      boolean logsStored()
      Returns:
      whether this Script allows log collection while being executed. This feature is used in Script Monitoring.
    • setLogsStored

      void setLogsStored(boolean logsStored)
      Sets whether this Script should allow log collection while being executed. This feature is used in Script Monitoring.