Package hudson.plugins.createjobadvanced
Class JobConfigurer
java.lang.Object
hudson.plugins.createjobadvanced.AbstractConfigurer<Job<?,?>,AuthorizationMatrixProperty>
hudson.plugins.createjobadvanced.JobConfigurer
- Direct Known Subclasses:
MavenConfigurer
Changes the configuration of
Job<?,?> items.- Author:
- Laurent Coltat
-
Field Summary
Fields inherited from class hudson.plugins.createjobadvanced.AbstractConfigurer
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaddAuthorizationMatrixProperty(Item item, AuthorizationMatrixProperty authProperty) Assigne given authorization matrix property to given item.protected final voidaddPermission(AuthorizationMatrixProperty authProperty, Permission perm, org.jenkinsci.plugins.matrixauth.PermissionEntry permEntry) Associate given Jenkins permission to given permission entry and assign it to given authorization property.protected final AuthorizationMatrixPropertyCreate a fresh new authorization matrix property.protected voidUpdate given Item according to plugin configuration.protected final AuthorizationMatrixPropertyFetch autorization matrix property from given item.protected final Map<Permission, Set<org.jenkinsci.plugins.matrixauth.PermissionEntry>> getGrantedPermissionEntries(AuthorizationMatrixProperty authProperty) Fetch association of Jenkins permissions to permission entries from given authorization matrix.auth.protected final voidremoveProperty(Item item, AuthorizationMatrixProperty authProperty) Remove given authorization matrix from given item.protected final voidRename given item with given name.protected final voidsetInheritanceStrategy(AuthorizationMatrixProperty authProperty, org.jenkinsci.plugins.matrixauth.inheritance.InheritanceStrategy inheritanceStrategy) Assign given inheritance strategy to given authorization matrix property.protected final booleanshowPermission(Permission perm) Check if given Jenkins permission is handled by this object.Methods inherited from class hudson.plugins.createjobadvanced.AbstractConfigurer
configurePermission, doRename, getPlugin, initPermissions, securityGrantPermissions, setupAuthorizationMatrixProperty
-
Constructor Details
-
JobConfigurer
protected JobConfigurer()
-
-
Method Details
-
renameJob
Description copied from class:AbstractConfigurerRename given item with given name.- Specified by:
renameJobin classAbstractConfigurer<Job<?,?>, AuthorizationMatrixProperty> - Parameters:
item- Item to be updatednewName- New name to be assigned- Throws:
IOException
-
doCreate
Description copied from class:AbstractConfigurerUpdate given Item according to plugin configuration.- Overrides:
doCreatein classAbstractConfigurer<Job<?,?>, AuthorizationMatrixProperty> - Parameters:
item- item to be updated
-
getAuthorizationMatrixProperty
@Nullable protected final AuthorizationMatrixProperty getAuthorizationMatrixProperty(@Nullable Item item) Description copied from class:AbstractConfigurerFetch autorization matrix property from given item.- Specified by:
getAuthorizationMatrixPropertyin classAbstractConfigurer<Job<?,?>, AuthorizationMatrixProperty> - Parameters:
item- owner of the autorization matrix property to be fetched- Returns:
- autorization matrix property of given item if any, null otherwize
-
removeProperty
protected final void removeProperty(@Nullable Item item, @Nullable AuthorizationMatrixProperty authProperty) Description copied from class:AbstractConfigurerRemove given authorization matrix from given item.- Specified by:
removePropertyin classAbstractConfigurer<Job<?,?>, AuthorizationMatrixProperty> - Parameters:
item- item to be updatedauthProperty- authorization matrix to be removed
-
getGrantedPermissionEntries
protected final Map<Permission,Set<org.jenkinsci.plugins.matrixauth.PermissionEntry>> getGrantedPermissionEntries(@Nullable AuthorizationMatrixProperty authProperty) Description copied from class:AbstractConfigurerFetch association of Jenkins permissions to permission entries from given authorization matrix.auth.- Specified by:
getGrantedPermissionEntriesin classAbstractConfigurer<Job<?,?>, AuthorizationMatrixProperty> - Parameters:
authProperty- authorization matrix to be updated.- Returns:
- a Map of Jenkins permissions linked to their assigned permissions entries.
-
addAuthorizationMatrixProperty
protected final void addAuthorizationMatrixProperty(@Nullable Item item, @Nullable AuthorizationMatrixProperty authProperty) throws IOException Description copied from class:AbstractConfigurerAssigne given authorization matrix property to given item.- Specified by:
addAuthorizationMatrixPropertyin classAbstractConfigurer<Job<?,?>, AuthorizationMatrixProperty> - Parameters:
item- Item to be updatedauthProperty- authorization matrix property to be assigned- Throws:
IOException
-
createAuthorizationMatrixProperty
Description copied from class:AbstractConfigurerCreate a fresh new authorization matrix property.- Specified by:
createAuthorizationMatrixPropertyin classAbstractConfigurer<Job<?,?>, AuthorizationMatrixProperty> - Returns:
- created authorization matrix property
-
setInheritanceStrategy
protected final void setInheritanceStrategy(@Nullable AuthorizationMatrixProperty authProperty, @Nullable org.jenkinsci.plugins.matrixauth.inheritance.InheritanceStrategy inheritanceStrategy) Description copied from class:AbstractConfigurerAssign given inheritance strategy to given authorization matrix property.- Specified by:
setInheritanceStrategyin classAbstractConfigurer<Job<?,?>, AuthorizationMatrixProperty> - Parameters:
authProperty- authorization matrix property to be updatedinheritanceStrategy- inheritance strategy to be assigned
-
addPermission
protected final void addPermission(@Nullable AuthorizationMatrixProperty authProperty, @Nullable Permission perm, @Nullable org.jenkinsci.plugins.matrixauth.PermissionEntry permEntry) Description copied from class:AbstractConfigurerAssociate given Jenkins permission to given permission entry and assign it to given authorization property.- Specified by:
addPermissionin classAbstractConfigurer<Job<?,?>, AuthorizationMatrixProperty> - Parameters:
authProperty- authorization matrix property to be updatedperm- Jenkins permission to be assignedpermEntry- permission entry to be associated
-
showPermission
Description copied from class:AbstractConfigurerCheck if given Jenkins permission is handled by this object.- Specified by:
showPermissionin classAbstractConfigurer<Job<?,?>, AuthorizationMatrixProperty> - Parameters:
perm- Jenkins permission- Returns:
- true if parameter is available
-