PHP 클래스 Scalr\Api\Service\User\V1beta0\Controller\Roles

부터: 5.4.0 (04.03.2015)
저자: Vitaliy Demidov ([email protected])
상속: extends Scalr\Api\Rest\Controller\ApiController, use trait GlobalVariableTrait
파일 보기 프로젝트 열기: scalr/scalr 1 사용 예제들

공개 메소드들

메소드 설명
createAction ( ) Creates a new Role in this Environment
createVariableAction ( integer $roleId ) : Scalr\Api\DataType\ResultEnvelope Creates role's global var
deleteAction ( integer $roleId ) : Scalr\Api\DataType\ResultEnvelope Deletes the role from the environment
deleteVariableAction ( integer $roleId, string $name ) : Scalr\Api\DataType\ResultEnvelope Deletes role's global variable
deregisterImageAction ( integer $roleId, string $imageId ) : Scalr\Api\DataType\ResultEnvelope Disassociates the specified Image.
describeAction ( ) Retrieves the list of the roles that are available on the Environment
describeImagesAction ( integer $roleId ) : array Retrieves the list of the Images associated with this Role
describeVariablesAction ( integer $roleId ) : array Gets the list of the available Global Variables of the role
fetchAction ( integer $roleId ) : Scalr\Api\DataType\ResultEnvelope Retrieves a specified role
fetchImageAction ( integer $roleId, string $imageId ) : mixed Fetches specified Image. It actually checks relations and redirects to Image
fetchVariableAction ( integer $roleId, string $name ) : Scalr\Api\DataType\ResultEnvelope Gets specific global var of the role
getImage ( integer $roleId, string $imageId ) : Image Gets the Image that is associated with the specified Role using User's Environment
getRole ( integer $roleId, boolean $restrictToCurrentScope = false, boolean $modify = null ) : Role | null Gets role from database using User's Environment
getVariableInstance ( ) : Scalr_Scripting_GlobalVariables Gets global variable object
modifyAction ( integer $roleId ) : Scalr\Api\DataType\ResultEnvelope Modifies role attributes
modifyVariableAction ( integer $roleId, string $name ) : Scalr\Api\DataType\ResultEnvelope Modifies role's global variable
registerImageAction ( integer $roleId ) : Scalr\Api\DataType\ResultEnvelope Associates a new Image with the Role
replaceImageAction ( integer $roleId, string $imageId ) : Scalr\Api\DataType\ResultEnvelope Associates a new Image with the Role

보호된 메소드들

메소드 설명
setImage ( ) Add, replace or remove image in role

비공개 메소드들

메소드 설명
getDefaultCriteria ( ) : array Gets Default search criteria for the Environment scope

메소드 상세

createAction() 공개 메소드

Creates a new Role in this Environment
public createAction ( )

createVariableAction() 공개 메소드

Creates role's global var
public createVariableAction ( integer $roleId ) : Scalr\Api\DataType\ResultEnvelope
$roleId integer
리턴 Scalr\Api\DataType\ResultEnvelope

deleteAction() 공개 메소드

Deletes the role from the environment
public deleteAction ( integer $roleId ) : Scalr\Api\DataType\ResultEnvelope
$roleId integer The identifier of the role
리턴 Scalr\Api\DataType\ResultEnvelope

deleteVariableAction() 공개 메소드

Deletes role's global variable
public deleteVariableAction ( integer $roleId, string $name ) : Scalr\Api\DataType\ResultEnvelope
$roleId integer
$name string
리턴 Scalr\Api\DataType\ResultEnvelope

deregisterImageAction() 공개 메소드

It actually checks relations before deletion.
public deregisterImageAction ( integer $roleId, string $imageId ) : Scalr\Api\DataType\ResultEnvelope
$roleId integer The identifier of the Role
$imageId string The identifier of the Image (uuid)
리턴 Scalr\Api\DataType\ResultEnvelope

describeAction() 공개 메소드

Retrieves the list of the roles that are available on the Environment
public describeAction ( )

describeImagesAction() 공개 메소드

Retrieves the list of the Images associated with this Role
public describeImagesAction ( integer $roleId ) : array
$roleId integer The identifier of the role
리턴 array

describeVariablesAction() 공개 메소드

Gets the list of the available Global Variables of the role
public describeVariablesAction ( integer $roleId ) : array
$roleId integer
리턴 array

fetchAction() 공개 메소드

Retrieves a specified role
public fetchAction ( integer $roleId ) : Scalr\Api\DataType\ResultEnvelope
$roleId integer The identifier of the role
리턴 Scalr\Api\DataType\ResultEnvelope

fetchImageAction() 공개 메소드

Fetches specified Image. It actually checks relations and redirects to Image
public fetchImageAction ( integer $roleId, string $imageId ) : mixed
$roleId integer The identifier of the Role
$imageId string The identifier of the Image (uuid)
리턴 mixed

fetchVariableAction() 공개 메소드

Gets specific global var of the role
public fetchVariableAction ( integer $roleId, string $name ) : Scalr\Api\DataType\ResultEnvelope
$roleId integer
$name string
리턴 Scalr\Api\DataType\ResultEnvelope

getImage() 공개 메소드

Gets the Image that is associated with the specified Role using User's Environment
public getImage ( integer $roleId, string $imageId ) : Image
$roleId integer The identifier of the Role
$imageId string The identifier of the Image which is expected to be associated with the Role
리턴 Scalr\Model\Entity\Image Returns the Image which corresponds the specified Role

getRole() 공개 메소드

Gets role from database using User's Environment
public getRole ( integer $roleId, boolean $restrictToCurrentScope = false, boolean $modify = null ) : Role | null
$roleId integer The identifier of the Role
$restrictToCurrentScope boolean optional Whether it should additionally check that role corresponds to current scope
$modify boolean optional Whether it should check access permission with modify flag
리턴 Scalr\Model\Entity\Role | null Returns Role entity on success or NULL otherwise

getVariableInstance() 공개 메소드

Gets global variable object
public getVariableInstance ( ) : Scalr_Scripting_GlobalVariables
리턴 Scalr_Scripting_GlobalVariables

modifyAction() 공개 메소드

Modifies role attributes
public modifyAction ( integer $roleId ) : Scalr\Api\DataType\ResultEnvelope
$roleId integer The identifier of the role
리턴 Scalr\Api\DataType\ResultEnvelope

modifyVariableAction() 공개 메소드

Modifies role's global variable
public modifyVariableAction ( integer $roleId, string $name ) : Scalr\Api\DataType\ResultEnvelope
$roleId integer
$name string
리턴 Scalr\Api\DataType\ResultEnvelope

registerImageAction() 공개 메소드

Associates a new Image with the Role
public registerImageAction ( integer $roleId ) : Scalr\Api\DataType\ResultEnvelope
$roleId integer The Identifier of the role
리턴 Scalr\Api\DataType\ResultEnvelope

replaceImageAction() 공개 메소드

Associates a new Image with the Role
public replaceImageAction ( integer $roleId, string $imageId ) : Scalr\Api\DataType\ResultEnvelope
$roleId integer The Identifier of the role
$imageId string The Identifier of the image
리턴 Scalr\Api\DataType\ResultEnvelope

setImage() 보호된 메소드

It wraps into separate call to avoid code duplicates on catching Exceptions
protected setImage ( )