Class CopyArtifactPermissionProperty

java.lang.Object
hudson.model.JobProperty<Job<?,?>>
hudson.plugins.copyartifact.CopyArtifactPermissionProperty
All Implemented Interfaces:
ExtensionPoint, Describable<JobProperty<?>>, ReconfigurableDescribable<JobProperty<?>>, BuildStep

public class CopyArtifactPermissionProperty extends JobProperty<Job<?,?>>
Job Property to define projects that can copy artifacts of this project.
  • Field Details

  • Constructor Details

    • CopyArtifactPermissionProperty

      @DataBoundConstructor public CopyArtifactPermissionProperty(String projectNames)
      Constructor
      Parameters:
      projectNames - comma-separated project names that can copy artifacts of this project.
  • Method Details

    • getProjectNameList

      public List<String> getProjectNameList()
      Returns:
      list of project names that can copy artifacts of this project.
    • getProjectNames

      public String getProjectNames()
      Returns:
      comma-separated project names that can copy artifacts of this project.
    • canCopiedBy

      public boolean canCopiedBy(Job<?,?> copier)
      Parameters:
      copier - a project who wants to copy artifacts of this project.
      Returns:
      whether copier is allowed to copy artifacts of this project.
    • canCopyArtifact

      public static boolean canCopyArtifact(Job<?,?> copier, Job<?,?> copiee)
      Convenient wrapper for canCopiedBy(Job)
      Parameters:
      copier - a project that wants to copy artifacts of copiee.
      copiee - a owner of artifacts.
      Returns:
      whether copier can copy artifacts of copiee.