@Component public class RestGlobalVariableServiceImpl extends Object implements RestGlobalVariableService
Modifier and Type | Field and Description |
---|---|
protected static int |
KEY_MAX_LENGTH |
protected static int |
VALUE_MAX_LENGTH |
Constructor and Description |
---|
RestGlobalVariableServiceImpl(com.atlassian.sal.api.message.I18nResolver i18nResolver,
RestPermissionCheck restPermissionCheck,
VariableConfigurationService variableConfigurationService,
VariableDefinitionManager variableDefinitionManager) |
Modifier and Type | Method and Description |
---|---|
RestGlobalVariable |
createGlobalVariable(javax.ws.rs.core.UriInfo uriInfo,
RestGlobalVariable restGlobalVariable)
Create a global variable
|
void |
deleteGlobalVariable(javax.ws.rs.core.UriInfo uriInfo,
long variableId)
Delete a global variable
|
RestGlobalVariable |
getGlobalVariable(javax.ws.rs.core.UriInfo uriInfo,
long variableId)
Retrieve a global variable definition
|
RestGlobalVariables |
getGlobalVariables(javax.ws.rs.core.UriInfo uriInfo)
Retrieve all global variables and values on bamboo server
Password variables will be encrypted using salted hash.
|
RestGlobalVariable |
updateGlobalVariable(javax.ws.rs.core.UriInfo uriInfo,
long variableId,
RestGlobalVariable restGlobalVariable)
Update a global variable
|
ErrorCollection |
validateVariable(RestGlobalVariable restGlobalVariable) |
javax.ws.rs.core.Response |
verifyGlobalVariableValue(RestVerificationRequest request)
Server side verification that the encrypted value of a global variable has changed.
|
protected static final int VALUE_MAX_LENGTH
protected static final int KEY_MAX_LENGTH
@Autowired public RestGlobalVariableServiceImpl(com.atlassian.sal.api.message.I18nResolver i18nResolver, RestPermissionCheck restPermissionCheck, VariableConfigurationService variableConfigurationService, VariableDefinitionManager variableDefinitionManager)
public RestGlobalVariables getGlobalVariables(javax.ws.rs.core.UriInfo uriInfo)
RestGlobalVariableService
getGlobalVariables
in interface RestGlobalVariableService
uriInfo
- Object that provides access to information of http requestfor how encryption is performed
public RestGlobalVariable getGlobalVariable(javax.ws.rs.core.UriInfo uriInfo, long variableId)
RestGlobalVariableService
getGlobalVariable
in interface RestGlobalVariableService
uriInfo
- Object that provides access to information of httpvariableId
- id fo the variablepublic RestGlobalVariable createGlobalVariable(javax.ws.rs.core.UriInfo uriInfo, RestGlobalVariable restGlobalVariable) throws WebValidationException
RestGlobalVariableService
createGlobalVariable
in interface RestGlobalVariableService
uriInfo
- Object that provides access to information of http requestrestGlobalVariable
- The global variable to be createdWebValidationException
- If some parameter is illegal, e.g. empty variable name, illegal characters in variable name, etc.public void deleteGlobalVariable(javax.ws.rs.core.UriInfo uriInfo, long variableId)
RestGlobalVariableService
deleteGlobalVariable
in interface RestGlobalVariableService
uriInfo
- Object that provides access to information of http requestvariableId
- Id of the variable to be removedpublic RestGlobalVariable updateGlobalVariable(javax.ws.rs.core.UriInfo uriInfo, long variableId, RestGlobalVariable restGlobalVariable) throws WebValidationException
RestGlobalVariableService
updateGlobalVariable
in interface RestGlobalVariableService
uriInfo
- Object that provides access to information of http requestvariableId
- Id of the variable to be updatedrestGlobalVariable
- New name/value of the global variableWebValidationException
- If the name/value is invalid, e.g. exceeds max value lengthpublic ErrorCollection validateVariable(RestGlobalVariable restGlobalVariable)
public javax.ws.rs.core.Response verifyGlobalVariableValue(RestVerificationRequest request)
RestGlobalVariableService
verifyGlobalVariableValue
in interface RestGlobalVariableService
request
- variable name and encrypted value to checkCopyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.