/******************************************************************************* * Copyright (c) 2012-2015 Codenvy, S.A. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Codenvy, S.A. - initial API and implementation *******************************************************************************/ package org.eclipse.che.api.account.server; import org.eclipse.che.api.account.shared.dto.UpdateResourcesDescriptor; import org.eclipse.che.api.core.ConflictException; import org.eclipse.che.api.core.ForbiddenException; import org.eclipse.che.api.core.NotFoundException; import org.eclipse.che.api.core.ServerException; import java.util.List; /** * Class for managing resources of workspaces * * @author Sergii Leschenko */ public interface ResourcesManager { /** * Redistributes resources between workspaces * * @param accountId * account's id * @param updateResourcesDescriptors * descriptor of resources for updating * @throws ForbiddenException * when account hasn't permission for setting attribute in workspace * @throws NotFoundException * when account or workspace with given id doesn't exist * @throws ConflictException * when account hasn't required Saas subscription * or user want to use more RAM than he has * @throws ServerException */ void redistributeResources(String accountId, List<UpdateResourcesDescriptor> updateResourcesDescriptors) throws NotFoundException, ServerException, ConflictException, ForbiddenException; }