Class RestGlobalVariableServiceImpl
java.lang.Object
com.atlassian.bamboo.plugins.rest.admin.globalvariable.RestGlobalVariableServiceImpl
- All Implemented Interfaces:
RestGlobalVariableService
@Component
public class RestGlobalVariableServiceImpl
extends Object
implements RestGlobalVariableService
Service layer to manage build concurrency
- Since:
- 5.9
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRestGlobalVariableServiceImpl(com.atlassian.sal.api.message.I18nResolver i18nResolver, RestPermissionCheck restPermissionCheck, VariableConfigurationService variableConfigurationService, VariableDefinitionManager variableDefinitionManager) -
Method Summary
Modifier and TypeMethodDescriptioncreateGlobalVariable(jakarta.ws.rs.core.UriInfo uriInfo, RestGlobalVariable restGlobalVariable) Create a global variablevoiddeleteGlobalVariable(jakarta.ws.rs.core.UriInfo uriInfo, long variableId) Delete a global variablegetGlobalVariable(jakarta.ws.rs.core.UriInfo uriInfo, long variableId) Retrieve a global variable definitiongetGlobalVariables(jakarta.ws.rs.core.UriInfo uriInfo) Retrieve all global variables and values on bamboo server Password variables will be encrypted using salted hash.updateGlobalVariable(jakarta.ws.rs.core.UriInfo uriInfo, long variableId, RestGlobalVariable restGlobalVariable) Update a global variablevalidateVariable(RestGlobalVariable restGlobalVariable) jakarta.ws.rs.core.ResponseServer side verification that the encrypted value of a global variable has changed.
-
Field Details
-
KEY_MAX_LENGTH
protected static final int KEY_MAX_LENGTH- See Also:
-
-
Constructor Details
-
RestGlobalVariableServiceImpl
@Autowired public RestGlobalVariableServiceImpl(com.atlassian.sal.api.message.I18nResolver i18nResolver, RestPermissionCheck restPermissionCheck, VariableConfigurationService variableConfigurationService, VariableDefinitionManager variableDefinitionManager)
-
-
Method Details
-
getGlobalVariables
Description copied from interface:RestGlobalVariableServiceRetrieve all global variables and values on bamboo server Password variables will be encrypted using salted hash.- Specified by:
getGlobalVariablesin interfaceRestGlobalVariableService- Parameters:
uriInfo- Object that provides access to information of http request- Returns:
- Collection of global variables
- See Also:
-
getGlobalVariable
Description copied from interface:RestGlobalVariableServiceRetrieve a global variable definition- Specified by:
getGlobalVariablein interfaceRestGlobalVariableService- Parameters:
uriInfo- Object that provides access to information of httpvariableId- id fo the variable- Returns:
- RestGlobalVariable object that contains name, value and link to the variable
-
createGlobalVariable
public RestGlobalVariable createGlobalVariable(jakarta.ws.rs.core.UriInfo uriInfo, RestGlobalVariable restGlobalVariable) throws WebValidationException Description copied from interface:RestGlobalVariableServiceCreate a global variable- Specified by:
createGlobalVariablein interfaceRestGlobalVariableService- Parameters:
uriInfo- Object that provides access to information of http requestrestGlobalVariable- The global variable to be created- Returns:
- The created global variable
- Throws:
WebValidationException- If some parameter is illegal, e.g. empty variable name, illegal characters in variable name, etc.
-
deleteGlobalVariable
public void deleteGlobalVariable(jakarta.ws.rs.core.UriInfo uriInfo, long variableId) Description copied from interface:RestGlobalVariableServiceDelete a global variable- Specified by:
deleteGlobalVariablein interfaceRestGlobalVariableService- Parameters:
uriInfo- Object that provides access to information of http requestvariableId- Id of the variable to be removed
-
updateGlobalVariable
public RestGlobalVariable updateGlobalVariable(jakarta.ws.rs.core.UriInfo uriInfo, long variableId, RestGlobalVariable restGlobalVariable) throws WebValidationException Description copied from interface:RestGlobalVariableServiceUpdate a global variable- Specified by:
updateGlobalVariablein interfaceRestGlobalVariableService- Parameters:
uriInfo- Object that provides access to information of http requestvariableId- Id of the variable to be updatedrestGlobalVariable- New name/value of the global variable- Returns:
- The updated variable
- Throws:
WebValidationException- If the name/value is invalid, e.g. exceeds max value length
-
validateVariable
-
verifyGlobalVariableValue
Description copied from interface:RestGlobalVariableServiceServer side verification that the encrypted value of a global variable has changed.- Specified by:
verifyGlobalVariableValuein interfaceRestGlobalVariableService- Parameters:
request- variable name and encrypted value to check- Returns:
- response
-