com.atlassian.bamboo.plugins.rest.admin.globalvariable
Interface RestGlobalVariableService

All Known Implementing Classes:
RestGlobalVariableServiceImpl

public interface RestGlobalVariableService

REST service layer to handler global variable operations

Since:
5.9

Method Summary
 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
 

Method Detail

getGlobalVariables

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.

Parameters:
uriInfo - Object that provides access to information of http request
Returns:
Collection of global variables
See Also:
for how encryption is performed

getGlobalVariable

RestGlobalVariable getGlobalVariable(javax.ws.rs.core.UriInfo uriInfo,
                                     long variableId)
Retrieve a global variable definition

Parameters:
uriInfo - Object that provides access to information of http
variableId - id fo the variable
Returns:
RestGlobalVariable object that contains name, value and link to the variable

createGlobalVariable

RestGlobalVariable createGlobalVariable(javax.ws.rs.core.UriInfo uriInfo,
                                        RestGlobalVariable restGlobalVariable)
                                        throws WebValidationException
Create a global variable

Parameters:
uriInfo - Object that provides access to information of http request
restGlobalVariable - 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

void deleteGlobalVariable(javax.ws.rs.core.UriInfo uriInfo,
                          long variableId)
Delete a global variable

Parameters:
uriInfo - Object that provides access to information of http request
variableId - Id of the variable to be removed

updateGlobalVariable

RestGlobalVariable updateGlobalVariable(javax.ws.rs.core.UriInfo uriInfo,
                                        long variableId,
                                        RestGlobalVariable restGlobalVariable)
                                        throws WebValidationException
Update a global variable

Parameters:
uriInfo - Object that provides access to information of http request
variableId - Id of the variable to be updated
restGlobalVariable - 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


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.