Search in sources :

Example 1 with AuthorizationQueryImpl

use of org.camunda.bpm.engine.impl.AuthorizationQueryImpl in project camunda-bpm-platform by camunda.

the class DeleteAuthorizationCmd method execute.

public Void execute(CommandContext commandContext) {
    final AuthorizationManager authorizationManager = commandContext.getAuthorizationManager();
    AuthorizationEntity authorization = (AuthorizationEntity) new AuthorizationQueryImpl().authorizationId(authorizationId).singleResult();
    ensureNotNull("Authorization for Id '" + authorizationId + "' does not exist", "authorization", authorization);
    authorizationManager.delete(authorization);
    return null;
}
Also used : AuthorizationQueryImpl(org.camunda.bpm.engine.impl.AuthorizationQueryImpl) AuthorizationEntity(org.camunda.bpm.engine.impl.persistence.entity.AuthorizationEntity) AuthorizationManager(org.camunda.bpm.engine.impl.persistence.entity.AuthorizationManager)

Aggregations

AuthorizationQueryImpl (org.camunda.bpm.engine.impl.AuthorizationQueryImpl)1 AuthorizationEntity (org.camunda.bpm.engine.impl.persistence.entity.AuthorizationEntity)1 AuthorizationManager (org.camunda.bpm.engine.impl.persistence.entity.AuthorizationManager)1