Package: org.gradle.plugins.signing

## [Java] Class SignOperation

- org.gradle.plugins.signing.SignOperation

- All Implemented Interfaces and Traits:
    SignatureSpec

      public class SignOperation
      extends groovy.lang.GroovyObjectSupport

  A sign operation creates digital signatures for one or more files or publish artifacts.

  The external representation of the signature is specified by the signature type property, while the signatory property specifies who is to sign.

  A sign operation manages one or more Signature objects. The `sign` methods are used to register things to generate signatures for. The execute() method generates the signatures for all of the registered items at that time.

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `SignOperation` | `configure(groovy.lang.Closure closure)` Executes the given closure against this object.
    `SignOperation` | `execute()` Generates actual signature files for all of the registered signatures.
    `String` | `getDisplayName()`
    `FileCollection` | `getFilesToSign()` All of the files that will be signed by this operation.
    `boolean` | `getRequired()`
    `Signatory` | `getSignatory()`
    `FileCollection` | `getSignatureFiles()` All of the signature files that will be generated by this operation.
    `SignatureType` | `getSignatureType()`
    `List<Signature>` | `getSignatures()` The registered signatures.
    `Signature` | `getSingleSignature()` Returns the single registered signature.
    `boolean` | `isRequired()`
    `void` | `setRequired(boolean required)`
    `void` | `setSignatory(Signatory signatory)`
    `void` | `setSignatureType(SignatureType signatureType)`
    `SignOperation` | `sign(PublishArtifact... artifacts)` Registers signatures for the given artifacts.
    `SignOperation` | `sign(File... files)` Registers signatures for the given files.
    `SignOperation` | `sign(String classifier, File... files)` Registers signatures (with the given classifier) for the given files
    `SignOperation` | `signatory(Signatory signatory)` Change the signatory for signature generation.
    `SignOperation` | `signatureType(SignatureType type)` Change the signature type for signature generation.
    `String` | `toString()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class groovy.lang.GroovyObjectSupport` | `groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()`
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Method Detail

    - #### public SignOperation configure(groovy.lang.Closure closure)

      Executes the given closure against this object.

    - #### public SignOperation execute()

      Generates actual signature files for all of the registered signatures.

      The signatures are generated with the configuration they have at this time, which includes the signature type and signatory of this operation at this time.

      This method can be called multiple times, with the signatures being generated with their current configuration each time.

      Returns:
        this
      See Also:
        Signature.generate

    - #### public String getDisplayName()

    - #### public FileCollection getFilesToSign()

      All of the files that will be signed by this operation.

    - #### public boolean getRequired()

    - #### @Override public Signatory getSignatory()

    - #### public FileCollection getSignatureFiles()

      All of the signature files that will be generated by this operation.

    - #### @Override public SignatureType getSignatureType()

    - #### public List<Signature> getSignatures()

      The registered signatures.

    - #### public Signature getSingleSignature()

      Returns the single registered signature.

      throws:
        IllegalStateException if there is not exactly one registered signature.
      Returns:
        The signature.

    - #### @Override public boolean isRequired()

    - #### @Override public void setRequired(boolean required)

    - #### @Override public void setSignatory(Signatory signatory)

    - #### @Override public void setSignatureType(SignatureType signatureType)

    - #### public SignOperation sign(PublishArtifact... artifacts)

      Registers signatures for the given artifacts.

      Returns:
        this
      See Also:
        Signature.Signature

    - #### public SignOperation sign(File... files)

      Registers signatures for the given files.

      Returns:
        this
      See Also:
        Signature.Signature

    - #### public SignOperation sign(String classifier, File... files)

      Registers signatures (with the given classifier) for the given files

      Returns:
        this
      See Also:
        Signature.Signature

    - #### public SignOperation signatory(Signatory signatory)

      Change the signatory for signature generation.

    - #### public SignOperation signatureType(SignatureType type)

      Change the signature type for signature generation.

    - #### @Override public String toString()