org.keycloak.scripting

## Class Script

- java.lang.Object
- - org.keycloak.scripting.Script

- All Implemented Interfaces:
    ScriptModel

      public class Script
      extends Object
      implements ScriptModel

  A `ScriptModel` which holds some meta-data.
  Author:
    Thomas Darimont

- - ### Field Summary

    - ### Fields inherited from interface org.keycloak.models.ScriptModel

      `TEXT_JAVASCRIPT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Script(String id, String realmId, String name, String mimeType, String code, String description)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getCode()` Returns the actual source code of the script.
    `String` | `getDescription()` Returns the description of the script.
    `String` | `getId()` Returns the unique id of the script.
    `String` | `getMimeType()` Returns the MIME-type if the script code, e.g.
    `String` | `getName()` Returns the name of the script.
    `String` | `getRealmId()` Returns the realm id in which the script was defined.
    `void` | `setCode(String code)`
    `void` | `setDescription(String description)`
    `void` | `setId(String id)`
    `void` | `setMimeType(String mimeType)`
    `void` | `setName(String name)`
    `void` | `setRealmId(String realmId)`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### Script

          public Script(String id,
                        String realmId,
                        String name,
                        String mimeType,
                        String code,
                        String description)

  - ### Method Detail

    - #### getId

          public String getId()

      Description copied from interface: `ScriptModel`
      Returns the unique id of the script. null for ad-hoc created scripts.
      Specified by:
        `getId` in interface `ScriptModel`

    - #### setId

          public void setId(String id)

    - #### getRealmId

          public String getRealmId()

      Description copied from interface: `ScriptModel`
      Returns the realm id in which the script was defined.
      Specified by:
        `getRealmId` in interface `ScriptModel`

    - #### setRealmId

          public void setRealmId(String realmId)

    - #### getName

          public String getName()

      Description copied from interface: `ScriptModel`
      Returns the name of the script.
      Specified by:
        `getName` in interface `ScriptModel`

    - #### setName

          public void setName(String name)

    - #### getMimeType

          public String getMimeType()

      Description copied from interface: `ScriptModel`
      Returns the MIME-type if the script code, e.g. for Java Script the MIME-type, `text/javascript` is used.
      Specified by:
        `getMimeType` in interface `ScriptModel`

    - #### setMimeType

          public void setMimeType(String mimeType)

    - #### getCode

          public String getCode()

      Description copied from interface: `ScriptModel`
      Returns the actual source code of the script.
      Specified by:
        `getCode` in interface `ScriptModel`

    - #### setCode

          public void setCode(String code)

    - #### getDescription

          public String getDescription()

      Description copied from interface: `ScriptModel`
      Returns the description of the script.
      Specified by:
        `getDescription` in interface `ScriptModel`

    - #### setDescription

          public void setDescription(String description)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2020 JBoss by Red Hat. All rights reserved.