Class FolderAuthorizationStrategyManagementLink

  • All Implemented Interfaces:
    hudson.ExtensionPoint, hudson.model.Action, hudson.model.ModelObject

    @Extension
    @ExportedBean
    @ParametersAreNonnullByDefault
    public class FolderAuthorizationStrategyManagementLink
    extends hudson.model.ManagementLink
    • Constructor Detail

      • FolderAuthorizationStrategyManagementLink

        public FolderAuthorizationStrategyManagementLink()
    • Method Detail

      • getIconFileName

        @CheckForNull
        public String getIconFileName()
        Specified by:
        getIconFileName in interface hudson.model.Action
        Specified by:
        getIconFileName in class hudson.model.ManagementLink
      • getDescription

        @Nonnull
        public String getDescription()
        Overrides:
        getDescription in class hudson.model.ManagementLink
      • getUrlName

        @CheckForNull
        public String getUrlName()
        Specified by:
        getUrlName in interface hudson.model.Action
        Specified by:
        getUrlName in class hudson.model.ManagementLink
      • getCategoryName

        public String getCategoryName()
        Name of the category for this management link. Exists so that plugins with core dependency pre-dating the version when this was introduced can define a category. TODO when the core version is >2.226 change this to override getCategory() instead
        Returns:
        name of the desired category, one of the enum values of Category, e.g. STATUS.
        Since:
        2.226
      • getGlobalPermissions

        @Nonnull
        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public Set<hudson.security.Permission> getGlobalPermissions()
      • getFolderPermissions

        @Nonnull
        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public Set<hudson.security.Permission> getFolderPermissions()
      • getAgentPermissions

        @Nonnull
        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public Set<hudson.security.Permission> getAgentPermissions()
      • doAssignSidToGlobalRole

        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public void doAssignSidToGlobalRole​(@QueryParameter(required=true)
                                            String roleName,
                                            @QueryParameter(required=true)
                                            String sid)
        Assigns sid to the global role identified by roleName.

        Parameters:
        roleName - the name of the global to which sid will be assigned to.
        sid - the sid of the user/group to be assigned.
        Throws:
        IllegalStateException - when Jenkins.getAuthorizationStrategy() is not FolderBasedAuthorizationStrategy
        IllegalArgumentException - when no role with name equal to roleName exists.
      • doAssignSidToFolderRole

        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public void doAssignSidToFolderRole​(@QueryParameter(required=true)
                                            String roleName,
                                            @QueryParameter(required=true)
                                            String sid)
        Assigns sid to the folder role identified by roleName.

        Parameters:
        roleName - the name of the global to which sid will be assigned to.
        sid - the sid of the user/group to be assigned.
        Throws:
        IllegalStateException - when Jenkins.getAuthorizationStrategy() is not FolderBasedAuthorizationStrategy
        NoSuchElementException - when no role with name equal to roleName exists.
      • doAssignSidToAgentRole

        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public void doAssignSidToAgentRole​(@QueryParameter(required=true)
                                           String roleName,
                                           @QueryParameter(required=true)
                                           String sid)
        Assigns sid to the AgentRole identified by roleName.

        Parameters:
        roleName - the name of the global to which sid will be assigned to.
        sid - the sid of the user/group to be assigned.
        Throws:
        IllegalStateException - when Jenkins.getAuthorizationStrategy() is not FolderBasedAuthorizationStrategy
        IllegalArgumentException - when no role with name equal to roleName exists.
      • getGlobalRoles

        @Nonnull
        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public SortedSet<GlobalRole> getGlobalRoles()
      • doGetAllFolders

        @GET
        @Nonnull
        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public net.sf.json.JSONArray doGetAllFolders()
        Get all AbstractFolders in the system
        Returns:
        full names of all AbstractFolders in the system
      • getAllComputers

        @Nonnull
        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public List<hudson.model.Computer> getAllComputers()
        Get all Computers in the system
        Returns:
        all Computers in the system
      • getAgentRoles

        @Nonnull
        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public SortedSet<AgentRole> getAgentRoles()
      • doDeleteFolderRole

        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public void doDeleteFolderRole​(@QueryParameter(required=true)
                                       String roleName)
        Deletes a folder role.
        Parameters:
        roleName - the name of the role to be deleted
        Throws:
        IllegalStateException - when Jenkins.getAuthorizationStrategy() is not FolderBasedAuthorizationStrategy
        IllegalArgumentException - when no role with name equal to roleName exists.
      • doRemoveSidFromGlobalRole

        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public void doRemoveSidFromGlobalRole​(@QueryParameter(required=true)
                                              String roleName,
                                              @QueryParameter(required=true)
                                              String sid)
        Removes sid from the global role identified by roleName.
        Parameters:
        roleName - the name of the global role from which sid will be removed.
        sid - the sid of the user/group to be assigned.
        Throws:
        IllegalStateException - when Jenkins.getAuthorizationStrategy() is not FolderBasedAuthorizationStrategy
        IllegalArgumentException - when no role with name equal to roleName exists.
      • doRemoveSidFromFolderRole

        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public void doRemoveSidFromFolderRole​(@QueryParameter(required=true)
                                              String roleName,
                                              @QueryParameter(required=true)
                                              String sid)
        Removes sid from the folder role identified by roleName.
        Parameters:
        roleName - the name of the folder role from which sid will be removed.
        sid - the sid of the user/group to be assigned.
        Throws:
        IllegalStateException - when Jenkins.getAuthorizationStrategy() is not FolderBasedAuthorizationStrategy
        IllegalArgumentException - when no role with name equal to roleName exists.
      • doRemoveSidFromAgentRole

        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public void doRemoveSidFromAgentRole​(@QueryParameter(required=true)
                                             String roleName,
                                             @QueryParameter(required=true)
                                             String sid)
        Removes sid from the agent role identified by roleName.
        Parameters:
        roleName - the name of the agent from which sid will be removed.
        sid - the sid of the user/group to be assigned.
        Throws:
        IllegalStateException - when Jenkins.getAuthorizationStrategy() is not FolderBasedAuthorizationStrategy
        IllegalArgumentException - when no role with name equal to roleName exists.